473,399 Members | 3,919 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Saving Pivotchart as an image

Hello,

I am trying to export a pivot chart to an image for inclusion in a
powerpoint report yet am having some issues. The code I am using is:

Sub ExportPivotChart()

Dim frm As form
Dim chartSpaceObj As OWC11.ChartSpace

For Each frm In Forms
If frm.Name Like "gra*" Then
Set chartSpaceObj = frm.ChartSpace
chartSpaceObj.ExportPicture "c:\test.gif", "gif", 1024,
1024
End If
Next frm

End Sub

if I use OWC10 then I get an RTE 430: Automation Error when it comes to the
export picture method. If I use OWC11 I get a RTE 13: Type Mismatch when
setting the chartspace object to the chartspace of my form. Could anyone
suggest what I am doing wrong Please? This appears to do excatly whats
suggested in the MS help etc...

Thanks

Andrew

Nov 13 '05 #1
1 4243
Try

Set chartSpaceObj = frm.ChartSpace.Object

but I suspect that won't work, you need to be referencing the control.object
on the form.

--
Terry Kreft

"Andrew Smith" <as****@meridianise.com> wrote in message
news:dk**********@nwrdmz02.dmz.ncs.ea.ibs-infra.bt.com...
Hello,

I am trying to export a pivot chart to an image for inclusion in a
powerpoint report yet am having some issues. The code I am using is:

Sub ExportPivotChart()

Dim frm As form
Dim chartSpaceObj As OWC11.ChartSpace

For Each frm In Forms
If frm.Name Like "gra*" Then
Set chartSpaceObj = frm.ChartSpace
chartSpaceObj.ExportPicture "c:\test.gif", "gif", 1024,
1024
End If
Next frm

End Sub

if I use OWC10 then I get an RTE 430: Automation Error when it comes to
the export picture method. If I use OWC11 I get a RTE 13: Type Mismatch
when setting the chartspace object to the chartspace of my form. Could
anyone suggest what I am doing wrong Please? This appears to do excatly
whats suggested in the MS help etc...

Thanks

Andrew

Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Tracy Griever via AccessMonster.com | last post by:
Simple way to change/remove the "Sum of..." text, or any text, in a PivotChart LEGEND. I searched other sites for many hours and could find no help on this subject...a co-worker stumbled upon the...
1
by: windandwaves | last post by:
Hi Folk I am trolling Google groups to find info, but so far unsuccessful. I have a form with in it a subform which is a pivotchart. From the main form, I have created a control that should...
0
by: francophone77 | last post by:
I created a button to open a pivotchart, but each time I click the button, it comes up in form view and I have to switch the view to pivotchart view in order to see the chart. Is there anyway...
4
by: dale zhang | last post by:
Hi, I am trying to save and read an image from MS Access DB based on the following article: http://www.vbdotnetheaven.com/Code/Sept2003/2175.asp Right now, I saved images without any...
5
by: TheGanjaMan | last post by:
Hi everyone, I'm trying to write up a simple image stamper application that stamps the Exif date information from the jpegs that I've taken from my digital camera and saves the new file with the...
0
by: pomeroymiles | last post by:
I have a pivotchart which I cause to take a huge list of people's test percentiles and calculate the average for each year. I then display the average above each bar. The problem is that there are...
1
by: erbrose | last post by:
Howdy all! I need help exporting a pivotchart to a .png I have a form 'frm_forquery' that allows a user to select a value called "TMC", this then runs a query and opens the pivotchart...
6
by: Mark Denardo | last post by:
My question is similar to one someone posted a few months back, but I don't see any replies. Basically I want to be able to have users upload photos and save them in a database (as byte data)...
1
by: grgimpy | last post by:
I have a pivotchart in a tab in my main form. First question: Is there a way to display only a certain number of the most recent records? For example, to limit the pivotchart to displaying only...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.