I know how to make a new document in word out of my VB App.
My Problem is that my code always starts Word new, despite it is open.
How can I determine wether word is already open or not (and only then open it new) and how can I add a new document to this already open Word ?
My Code:
Set wdApp = New Word.Application
wdApp.Caption = "MyName"
wdApp.ShowMe
Set newDoc = wdApp.Documents.Add
newdoc.activate
My Problem is that my code always starts Word new, despite it is open.
How can I determine wether word is already open or not (and only then open it new) and how can I add a new document to this already open Word ?
My Code:
Set wdApp = New Word.Application
wdApp.Caption = "MyName"
wdApp.ShowMe
Set newDoc = wdApp.Documents.Add
newdoc.activate