saeedo44
New member
- Joined
- Jun 30, 2020
- Messages
- 1
- Reaction score
- 0
- Points
- 0
- Excel Version(s)
- Pro Plus 2016
So I had this code in Excel VBA:
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:
Thanks
Code:
Dim oWord As New Word.Application
Dim objDoc
Set objDoc = oWord.Documents.Open("C:\folder\document.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:
Code:
'Set objDoc = oWord.Documents.Open(Object 1)
Thanks