vba - Creating a Powerpoint with Graphs from Access -


I'm trying to create a PowerPoint from the graph in programmable access. Ideally, when graphs take on to PowerPoint they will not link to static images and graphs still access data

I have tried the processes such as this.

  Personal set command1_click () object set pwrpnt = CreateObject ("Powerpoint.Application") pwrpnt.Activate the set presentation = pwrpnt.Presentation.Open as object dim position rendered slow pwrpnt ( "C: \ test.ppt") Me.Graph1.SetFocus Runcommand acCmdcopy Presentation.Slides (1) .Shapes.Paste Set pwrpnt = None Set Presentation = Nothing End Sub  

And I get an error message such as:. Paste method failed

Is there a better way? And can it be forced to become a stable image?

Thank you.

OK, I found a way to do this. I still have a more elegant way to anyone, so interested, but to deal with a similar problem to someone else:

  private sub-command1_click () 'Note: only sample In the actual code it should probably be 'PPT file and then close the PowerPoint application, not to mention some error handling,' save something and possibly some formatting the picture, etc. PirmPnt PowerPoint.Presentation Me.Graph0.Action = acOLECopy Set PowerPoint.Application as Presetation In the form, pwrpnt = CreateObject ("Powerpoint.Application") pwrpnt.Activate set presentation = pwrpnt.Presentations.Open ("TemplateFile.ppt") pwrpnt.ActiveWindow.ViewType = ppViewSlide 'Insert this as a picture, just like To add it, use Paste as a real chart. Pwrpnt.ActiveWindow.View.PasteSpecialPPPistainenset MetafileEndab  

Comments

Popular posts from this blog

c++ - Linux and clipboard -

Visual Studio 2005: How to speed up builds when a VSMDI is open? -

booting ubuntu from usb using virtualbox -