Results 1 to 20 of 21

Thread: copy from Word to Access

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #6
    VBAX Master TonyJollans's Avatar
    Joined
    May 2004
    Location
    Norfolk, England
    Posts
    2,291
    Location
    Hi Ed,

    It seems to me you're almost there.

    - 1 - You don't need the objWord.Visible line - if you've opened Word manually, it's already visible.

    - 2 - You are Selecting the Document, but not copying it. Instead of

    objDoc.Selection.HomeKey Unit:=wdStory 
    objDoc.Selection.Extend
    try just using

    objDoc.Content.Copy
    - 3 - That's really it. Just set your Object variables (objWord and objDoc) to Nothing before you finish.
    Last edited by Aussiebear; 03-26-2023 at 11:14 AM. Reason: Adjusted the code tags
    Enjoy,
    Tony

    ---------------------------------------------------------------
    Give a man a fish and he'll eat for a day.
    Teach him how to fish and he'll sit in a boat and drink beer all day.

    I'm (slowly) building my own site: www.WordArticles.com

Posting Permissions

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