Results 1 to 2 of 2

Thread: Excel Documents.Open for embedded Word object instead of external file

  1. #1
    Neophyte saeedo44's Avatar
    Join Date
    Jun 2020
    Posts
    1
    Articles
    0
    Excel Version
    Pro Plus 2016

    Excel Documents.Open for embedded Word object instead of external file



    Register for a FREE account, and/
    or Log in to avoid these ads!

    So I had this code in Excel VBA:

    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

  2. #2
    Conjurer NormS's Avatar
    Join Date
    Jul 2017
    Posts
    120
    Articles
    0
    Excel Version
    Excel 2016 ProPlus
    Have you tried the macro recorder?

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •