All Downloads are FREE. Search and download functionalities are using the official Maven repository.

4j.documents4j-transformer-msoffice-word.1.0.2.source-code.word_start.vbs Maven / Gradle / Ivy

' First, try to get a running instance.
On Error Resume Next
Dim wordApplication
Set wordApplication = GetObject(, "Word.Application")

' If MS Word is already running, the script is successful.
If Err = 0 Then
  WScript.Quit 3
End If

' Start MS Word.
Set wordApplication = CreateObject("Word.Application")
If Err = 0 Then
  WScript.Quit -6
End If

' Disable execution of macros.
wordApplication.WordBasic.DisableAutoMacros

' Exit and signal success.
WScript.Quit 3




© 2015 - 2024 Weber Informatics LLC | Privacy Policy