Четверг, Сентябрь 24, 2020

Версия и запуск Word

Sub GetWordVersion()
   Dim WordApp As Object
   Set WordApp = CreateObject("Word.Application")
   WordApp.Visible = True
   MsgBox WordApp.Version
   WordApp.Quit
   Set WordApp = Nothing
End Sub


Sub wor()
   Dim WordApp As Object
   Set WordApp = CreateObject("Word.Application")
   WordApp.Visible = True
   WordApp.documents.Add
   WordApp.Selection.TypeText Text:="Привет из Excel :)"
   WordApp.ActiveDocument.SaveAs Filename:="d:\myDoc.doc"
   WordApp.Quit
   Set WordApp = Nothing
End Sub


Back to Top