.


:




:

































 

 

 

 


. .




. . , ( ).

, . . , , , . , Cancel False.

- : , "", . VBA .

: ( ), , VBA -.

. , CommandButton1 , CommandButton2_Click.

Private Sub CommandButton1_Click()

MsgBox "11"

CommandButton2_Click

End Sub

 

Private Sub CommandButton2_Click()

MsgBox "22"

End Sub

. JavaScript , FoxPro . VBA .

Application

MS Word Document. , Word.Application. 2 , ThisDocument, , .

:

Public WithEvents app As Word.Application

 

Private Sub begin_app()

set app = Word.Application

end sub

 

Private Sub app_WindowSelectionChange (ByVal Sel As Selection)

Sel.Font.Bold = True

End Sub

 

Private Sub end_app()

set app = Nothing

end sub

ThisDocument, , , ( ) app , ( ). : WindowSelectionChange.

. . , MS Word MS Excel , MS Word. , MS Excel, Word.Application, Dialogs.

Dialog, MS Word. , : Dialogs, Dialog, Built-in Dialog Box Argument Lists, Displaying built-in Word dialog boxes. , .

Dialog: Display, Show, Execute, Update.

Display , , . , , , . .

Execute . , , . , , , .

, .doc, , , , .

With Dialogs(wdDialogFileOpen)

.Display 2000

If Left(.Name, 5) = "" Then.Execute

End With

Execute .

With Dialogs(wdDialogFormatParagraph)

.KeepWithNext = 1

.Execute

End With

Show , : , ..

Update () , Selection. Times New Roman. Times New Roman.

Set myDialog = Dialogs(wdDialogFormatFont)

myDialog.Show

( ), Update.

Set myDialog = Dialogs(wdDialogFormatFont)

Selection.Font.Name = "Arial"

myDialog.Update

myDialog.Show





:


: 2016-11-18; !; : 424 |


:

:

, .
==> ...

1749 - | 1587 -


© 2015-2024 lektsii.org - -

: 0.01 .