Forum Discussion
guifernandes1607
Sep 06, 2022Copper Contributor
Word Blocked Macros
Hi We created some macros to fill in a Word document according to information provided by a third party software called Protheus. The macros were working perfectly, but as of last week, after some W...
Villi_B Try using the following:
Dim bstartApp As Boolean
On Error Resume Next
Set objWord = GetObject(, "Word.Application")
If Err Then
bstartApp = True
Set objWord = CreateObject("Word.Application")
End If
On Error GoTo 0
'Then, at the end of your code incorporate
If bstartApp = True Then
objWord.Quit
End If
Villi_B
Sep 13, 2022Copper Contributor
Doug, this fixed the issue on my PC! I'm giving the modified compiled source to some coworkers right now, fingers crossed but I'm feeling optimistic, thank you very much!