Message 1 of 8
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi to all,
I've tried the following code to see the differences, but Set Doc=ThisDoc.Document give run time error 404 no object, while the second one is correct.
What's wrong in my usage of ThisDoc?
Sub example()
Dim oDoc As Document, Doc As Document
Set oDoc = ThisApplication.ActiveDocument
Set Doc = ThisDoc.Document
MsgBox oDoc.DocumentType + "ThisApplication example"
MsgBox Doc.DocumentType + "ThisDoc example"
End Sub
Solved! Go to Solution.