Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Other Office > Word VBA
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Word VBA Discuss using VBA to program Word.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Word VBA section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 18th, 2006, 10:23 PM
Registered User
Join Date: Jan 2006
Location: Valentine, NSW, Australia.
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Inserting Excel pivot chart into Word documents

I have a problem with inserting Excel Pivot Charts in Word documents and I was hoping that I someone can help.

The organisation I worked for deals with large datasets which contain health related information about our entire state (NSW). To make the information useful, staff used to create Pivot Tables/Pivot Chart for individual location, date range and disease and copy generated Pivot Charts to Word Reports. Each report contains between 320 and 680 charts. We decided to streamline the process by generating required charts using VBA and them link or copy them in Word report file. Creating pivot charts in Excel was easy; however, trying to link or copy Excel pivot charts to Word is proving to be more difficult then expected.

I just don’t seem to be able to see the chart (pivot or not) when I try to link or insert a chart into Word document.

For example, workbook called CamillaMonthlyRates1 - Total Seasonality Chart.xls has three sheets:

  • CTSP1 Totals (contains raw data)
  • CTSP1 Data (contains pivot table from the raw data)
  • CTSP1 Chart (chart built using data from CTSP1 Data)

When I manually go to Word document and click Insert, File and locate CamillaMonthlyRates1 - Total Seasonality Chart.xls I am presented with a Open Worksheet form. Open a document in Workbook combo box defaults to Entire Workbook but when I open the combo box on only has three options:

  • Entire Workbook
  • CTSP1 Totals
  • CTSP1 Data

The one I really want to I want to insert into Word document (CTSP1 Chart) isn’t listed at all in the combo box so it can not be selected. I don’t know how to do it, do you? I would love to hear from you if you do.

NOTE: I tried exporting the chart as GIF using VBA so I can link to a graphic file but that doesn’t see to work as well as we expected either.

I used the following code during testing to generate the graphic:

'Export chart as graphic 
strChartFileName = "N:\DATA\Projects\Area\CDAP\JF Charts\Charts\CTSP1" & Format(Date, "yymmdd") & ".gif" 
ActiveChart.Export Filename:=strChartFileName, FilterName:="GIF"]
This resulting file was saved as "CTSP10~1.GIF" using DOS naming convention (8 characters long) with rest of the name truncated, not as "CTSP1060119.GIF" as expected with todays (19/1/2006) save. Saved chart also looks like a screen dump; combo boxes are displayed as grey combo boxes on screen, “Drop Series Fields Here” pivot table prompt is visible in the graphic just like on the screen and the quality is not great seem more blurred then when we used Windows Copy/Paste to copy chart from Excel to Word. I tried exporting using GIF and JPG format without much difference.

Any suggestions?

Reply With Quote
  #2 (permalink)  
Old January 23rd, 2006, 09:16 PM
Authorized User
Join Date: Dec 2005
Location: , , .
Posts: 14
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to zach007


Please have a look to this link:


and also this link:


I wish that could help :)

Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Inserting Excel pivot chart into Word document jfejsa Excel VBA 3 March 15th, 2007 03:53 PM
OWC10: binding Chart to Pivot Table rfrancisco Classic ASP Components 0 February 10th, 2006 01:47 PM
Inserting Word Documents into Access showie Access VBA 4 December 14th, 2005 02:02 PM
Pivot Chart View Problems wall_of_jericho Access 1 July 27th, 2005 11:05 AM
Using Customized chart for Pivot Chart kliu9 Excel VBA 3 October 13th, 2004 09:37 AM

All times are GMT -4. The time now is 09:12 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.