Consulting

Results 1 to 5 of 5

Thread: Solved: Excel Pasting doesn't align to Word Bookmark

  1. #1
    VBAX Mentor
    Joined
    Jan 2009
    Posts
    304
    Location

    Solved: Excel Pasting doesn't align to Word Bookmark

    I'm trying to use the code that is posted here at VBAExpress, the article location is /kb/getarticle.php?kb_id=133.

    When Excel pastes a Chart into Word it does not paste the Chart at the Bookmark Location. It Pastes the Chart at the top of the Word page that has the Bookmark.

    In example, if the Bookmark is located in the middle of Page 3 of the Word Doc the Chart will get pasted at the top of Page 3, not in the middle where the Bookmark is located.

    Any ideas?

    Thanks for any help...

    Jim

    PS: I'm wasn't sure if this should be posted in the Excel or Word Forum.

  2. #2
    VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,323
    Location
    You need to look at the page breaks in the word document I think. Next to view hit the button that looks like a revers P and see where the page breaks are located......that seems most likely to be your problem.

    You can post an example if you hit post reply at the bottom left of the last post.....compose your message and scroll down and look for the button that says "manage attachments"
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

  3. #3
    VBAX Mentor
    Joined
    Jan 2009
    Posts
    304
    Location
    I think I figured it out.

    The Paste Code in Excel needs to be:

    appWrd.Selection.PasteSpecial Link:=False, DataType:=wdPasteMetafilePicture, Placement:= _
    wdInLine, DisplayAsIcon:=False

    Thanks...

  4. #4
    VBAX Guru Kenneth Hobs's Avatar
    Joined
    Nov 2005
    Location
    Tecumseh, OK
    Posts
    4,956
    Location
    You mean it does that with the kb example? It worked fine for me.

    If it is your DOC, what happens when you do it manually? Copy the chart and then Ctrl+G to goto your bookmark in the DOC file and paste. The usual behavior is to put the image on the next page when there is not enough room on the current page at that location.

  5. #5
    VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,323
    Location
    ah, good catch. Guess Jake and I need to know more about Word. I know I only use if because I have to.......


    Be sure to mark your thread solved using the thread tools at the top of the page.
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

Posting Permissions

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