+ Reply to Thread
Results 1 to 3 of 3

Macro to insert 2 graphs from seperate excel tabs into a single word document

  1. #1
    Registered User
    Join Date
    01-25-2010
    Location
    Auckland, New Zealand
    MS-Off Ver
    Excel 2010 and Excel 2007 (Windows 7 and XP mode)
    Posts
    9

    Macro to insert 2 graphs from seperate excel tabs into a single word document

    Hello everyone,

    Am hoping to create a macro that will cut 2 excel graphs (each on their own tab) and paste them into a word document of my choosing. It will alwasy be the first 2 graphs that need replacing in the word document.

    I want to do this because I am streamlining a report writing process which is repetitive.

    Your help is much appreciated,

    rpt21

  2. #2
    Forum Expert
    Join Date
    11-23-2005
    Location
    Rome
    MS-Off Ver
    Ms Office 2016
    Posts
    1,628

    Re: Macro to insert 2 graphs from seperate excel tabs into a single word document

    Put this macro in Excel (2003) where you have your graphs and try it... I hope it can help you:
    Please Login or Register  to view this content.
    Regards,
    Antonio

  3. #3
    Registered User
    Join Date
    01-25-2010
    Location
    Auckland, New Zealand
    MS-Off Ver
    Excel 2010 and Excel 2007 (Windows 7 and XP mode)
    Posts
    9

    Re: Macro to insert 2 graphs from seperate excel tabs into a single word document

    Hi Antonio,

    Thanks for that. The first part of the code works, it seems to get stuck at "sh.ChartObjects(1).Select". It says "Run-time error '1004': Method 'ChartObjects' of object '_Worksheet' failed".

    The first graph is on the 3rd Sheet named 'Leaks graph' and the second graph is on the 4th Sheet named 'Leaks Chronicle' and they are to replace the first 2 graphs in the document of my choice.

    I changed .doc to docx because I work with word 2007, hope this doesn't affect anything?

    much appreciated,

    Ross

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1