none
How to obtain the entire contents of a Word document (RTF formatted text) using VBA code in a Word macro? RRS feed

  • Question

  • Greetings -

    I would like to obtain the contents of an entire Word document in RTF formatted text and put that information into a string variable via VBA code in a macro...

    Conversely, I would like to take a string variable containing RTF formatted text and put that into a Word document via VBA code in a macro.

    I can manipulate just the text, but I'm loosing all of the formatting - any suggestions?

    Tuesday, February 20, 2018 6:54 PM

All replies

  • String variables, by definition, do not contain formatting information. Perhaps you could explain what you're trying to achieve.

    Cheers
    Paul Edstein
    [MS MVP - Word]

    Tuesday, February 20, 2018 9:19 PM
  • Hi Conrad_Gudgel,

    >>I would like to obtain the contents of an entire Word document in RTF formatted text

    Could you share us what you mean by obtain RTF Text?

    It would be helpful if you could share us more information about your issue.

    Best Regards,

    Tao Zhou


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, February 23, 2018 2:32 AM