(Solved) – Documents.Open for embedded Word object


So I had this code in Excel VBA:

Dim oWord As New Word.Application
Dim objDoc
Set objDoc = oWord.Documents.Open("C:folderdocument.docx")

But now instead of having document.docx as an external Word document I embedded it on a sheet as an object (Object 1).
Therefore, I want to edit the code above to access the object instead of the external file.

In other words I want the code to be something like this:

'Set objDoc = oWord.Documents.Open(Object 1)

I have seen the question here, but I want the line of code above and it doesn’t explain how to do it.


Leave a Reply

Your email address will not be published. Required fields are marked *