runtime error "Microsoft.Office.Interop.Word.Application.ActiveDocument"

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Hi all,
I am very new to programming, I am trying to build a word add in to add xml files to documents, I am under the assumption that Microsoft.Office.Interop.Word.Application.ActiveDocument will work with the document being used, but when I try to use the add
in I receive the error: " this command is not available because no document is open " o:
Dim activeDoc As New Microsoft.Office.Interop.Word.Application<br/>
Dim currentDoc As Microsoft.Office.Interop.Word.Document = activeDoc.ActiveDocument()
the second line. Any help will be greatly appreciated.
Thank You,
B

View the full article
 
Back
Top