Referencing a Word document that is already open
I'm having problems with the following code where the oRng is comming up empty. Using Create Object to open the word document works fine but it is a very large document to reopen so I would like to be able to reference the open document with objWord. Any ideas?
Code:
Dim objWord As Object
Dim oRng as Word.Range
Set objWord = GetObject(,"Word.Application")
Set objWord = GetObject("C:/test.docm") 'I've tried with and with out this line without any luck
set oRng = objWord.activedocument.content