Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:

Ивличев П.С. Практикум по информационным... Ч. 10

.pdf
Скачиваний:
12
Добавлен:
07.01.2021
Размер:
806.39 Кб
Скачать

31

 

 

Value.

 

-

 

 

1.

 

-

CommandButton1.

,

-

Click.

 

,

.

 

-

 

 

Private Sub CommandButton1_Click()

ActiveDocument.Tables(3).Cell(1, 1).Range.InsertAfter (ComboBox1.Value)

ActiveDocument.Tables(3).Cell(1, 2).Range.Text = TextBox1.Value If OptionButton1.Value = True Then

ActiveDocument.Tables(3).Cell(1, 2).Range.Font.Italic = True

Else

ActiveDocument.Tables(3).Cell(1, 2).Range.Font.Italic = False End If

End Sub

2.

 

 

.docm

 

-

 

.

 

.

 

 

3.

 

 

.

 

-

4.

.

 

 

 

.

 

 

CommandButton1_Click()

.

UserForm1.Hide,

 

 

.

 

 

 

 

 

 

 

20.

 

 

 

 

.

 

 

 

.

 

1.

VBA

 

 

 

UserForm1.Show

 

 

 

-

2.

 

 

.

 

-

 

 

5

 

.

.docm,

 

 

 

,

 

.

 

 

 

 

 

 

3.

 

,

,

,

 

.

 

 

5

 

 

4.

 

 

 

VBA.

 

UserForm1.Show.

 

 

5.

 

 

,

5

 

 

 

.

-

 

 

 

 

32

 

 

 

 

.

 

 

,

 

.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

21.

 

)

(

 

 

 

 

 

 

 

 

 

 

1.

 

 

 

(

 

 

 

 

 

 

 

 

 

 

 

 

 

).

,

 

-

 

 

 

 

.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

.

.

,

 

 

DШМuЦОЧЭ

RКЧРО,

RКЧРО,

 

 

 

 

 

 

SОХОМЭ,

 

 

SОХОМЭТШЧ.

RКЧРО –

,

-

 

 

 

 

RКЧРО;

SОХОМЭ –

 

-

,

 

 

SОХОМЭТШЧ

 

 

.

 

RКЧРО

 

SОХОМЭ,

 

RКЧРО

 

.

 

 

SОХОМЭ

 

SОХОМЭТШЧ.

 

 

,

SОХОМЭТШЧ

RКЧРО,

 

 

 

RКЧРО,

RКЧРО

 

:

.

 

-

 

 

 

 

 

 

 

.

 

(

 

 

)

 

 

RКЧРО:

 

 

 

 

 

ActiveDocument.Range.Sections(1).Range.Paragraphs(l).Range.Sentences(1).

 

 

Words(1).Characters(1)

 

 

 

 

 

 

 

RКЧРО

SОХОМЭТШЧ

 

 

 

: «

», «

», «

», «

».

-

 

 

 

 

,

 

.

 

 

 

 

.

 

 

,

-

 

 

 

 

 

 

 

 

RКЧРО

SОХОМЭТШЧ.

 

 

 

-

,

 

SЭКЫЭ

EЧН

 

 

 

.

 

 

,

 

 

-

.

 

 

 

 

 

 

 

MШЯО

 

 

 

 

 

.

 

MШЯО(UЧТЭ, CШuЧЭ)

,

 

.

 

 

 

 

,

 

 

.

UЧТЭ

 

 

 

, К CШuЧЭ –

 

(

1).

-

 

CШuЧЭ

 

 

 

.

-

,

 

 

 

.

-

.

 

 

 

,

 

 

 

 

 

 

33

 

 

,

0,

 

 

.

 

UЧТЭ

 

 

аНCСКЫКМЭОЫ

(

), аНАШЫН, аНSОЧЭОЧМО,

wdPaЫКРЫКЩС, аНSОМЭТШЧ, аНSЭШЫв, аНCОХХ, аНCШХuЦЧ, аНRШа аНTКЛХО.

 

 

,

Selection.Move Unit:=wdParagraph, Count:=2

 

 

 

 

 

 

.

 

 

-

 

 

 

 

 

 

 

,

 

 

RКЧРО

SОХОМЭТШЧ.

 

 

 

-

 

,

 

RКЧРО,

 

 

 

.

 

 

 

 

 

 

 

 

 

 

ActiveDocument.Paragraphs(l).Range.Move

 

 

 

,

 

 

 

 

 

.

MШЯО

 

 

,

 

,

 

-

MШЯОSЭКЫЭ

MШЯОEЧН

 

,

 

 

.

,

 

.

 

 

 

 

 

 

 

 

 

 

 

 

Delete

 

 

.

 

 

 

,

DОХОЭО(UЧТЭ,CШuЧЭ),

 

RКЧРО

SОХОМЭТШЧ.

 

.

-

 

 

 

 

UЧТЭ

 

 

,

 

 

 

 

:

аНАШЫН

аНCСКЫКМЭОЫ.

 

CШuЧЭ

 

 

 

-

.

 

 

,

CШuЧЭ.

 

 

 

 

 

 

 

 

 

 

 

 

 

IЧЬОЫЭ

RКЧРО

SОХОМЭТШЧ

 

 

-

 

 

 

.

 

 

 

 

 

IЧЬОЫЭBОПШЫО(TОбЭ)

IЧЬОЫЭAПЭОЫ(TОбЭ).

ЭОбЭ

ЬЭЫТЧР

 

,

 

 

 

 

,

 

ЫКЧРО

ЬОХОМЭТШЧ.

 

.

 

 

 

 

,

 

 

 

 

 

 

 

 

 

 

 

TОбЭ

 

 

 

 

 

,

-

 

 

 

IЧЬОЫЭ(TОбЭ).

IЧЬОЫЭBОПШЫО

IЧЬОЫЭAПЭОЫ

 

,

 

 

,

 

 

.

-

 

 

,

 

 

.

 

 

 

,

 

 

 

 

IЧЬОЫЭSвЦЛШХ

 

IЧЬОЫЭPКЫКРЫКЩС,

 

 

 

.

 

 

 

34

1.

,

 

,

 

 

 

UserForm

 

 

 

3

 

UserForm

 

 

 

 

 

 

 

 

 

 

 

 

 

 

ActiveControl

 

 

 

.

,

 

 

 

 

 

 

 

 

 

 

 

BackColor

 

Long

 

 

 

Caption

 

,

 

 

 

Controls

 

 

 

 

 

 

 

 

 

 

 

Enabled

 

.

Boolean,

,

-

 

 

 

False,

 

 

 

 

 

 

Font

 

 

Font,

 

-

 

 

 

 

 

 

ForeColor

 

,

BackColor,

 

-

 

 

,

 

(

 

 

 

)

 

 

 

4

 

UserForm

 

 

 

 

 

 

 

 

 

 

 

 

 

Copy

 

 

 

 

 

 

 

Windows

 

 

 

ut

 

 

 

 

 

 

 

 

Windows

 

 

Hide

 

,

 

,

-

 

 

,

 

 

 

 

 

 

 

Paste

 

 

 

Windows

-

 

 

 

 

 

 

Show

 

,

.

 

 

 

 

 

 

 

5

 

UserForm

 

 

 

 

 

 

 

 

 

 

 

 

 

Activate

 

.

,

 

-

 

 

 

,

 

 

 

 

 

 

 

 

 

,

,

-

 

 

 

 

 

 

35

Click

 

,

(

 

,

 

)

 

 

 

 

DblClick

 

,

(

 

,

 

)

 

 

 

 

Deactivate

 

,

 

 

 

 

 

Initialize

 

,

-

 

Load

Show.

-

 

 

 

-

 

 

 

 

Resize

 

 

 

Terminate

 

,

 

 

 

.

 

 

 

,

-

 

 

,

 

 

 

 

 

36

2.

20

Private Sub CommandButton1_Click()

Dim n As Integer

n = ActiveDocument.Tables(3).Cell(1, 1).Range.Paragraphs.Count

Dim m As Integer

m = ActiveDocument.Tables(3).Cell(1, 1).Range.Paragraphs(n).Range._

Characters.Count

ActiveDocument.Tables(3).Cell(1, 1).Range.Paragraphs(1).Range.Select

Selection.Move Unit:=wdParagraph, Count:=n - 1

Selection.MoveEnd Unit:=wdCharacter, Count:=m - 1

Selection.Text = ComboBox1.Value

ActiveDocument.Tables(3).Cell(1, 1).Range.InsertAfter (ComboBox1.Value)

ActiveDocument.Tables(3).Cell(1, 2).Range.Text = TextBox1.Value

If OptionButton1.Value = True Then

ActiveDocument.Tables(3).Cell(1, 2).Range.Font.Italic = True

Else

ActiveDocument.Tables(3).Cell(1, 2).Range.Font.Italic = False

End If

UserForm1.Hide

End Sub

10

. .

 

50

 

.

 

60×90/16.

.

. . 2,3.

.

, . 1-

 

, 18.

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]