M
mstuehler
All,
I've created a word document that contains an embedded chart (using Insert >
Picture > Chart) The chart's layout optin is "In front of text".
What I'd like to do change/modify the data in the datasheet of this chart
using vba or vbscript, but I don't know how to reference it.
I've done the same thing in PowerPoint with this:
Set oApp = CreateObject("Powerpoint.Application")
Set oPres = oApp.Presentations.Open("C:\Presentation.ppt")
Set oSlide = oPres.Slides("slide1")
Set oChart = oSlide.Shapes("chart")
with (oChart..OLEFormat.Object.Application.DataSheet)
.Range("A1").Value = 100
End With
But I don't understand the object model of word well enough to do this in
Word. I also don't know how to name objects in Word so that I can reference
them.
Many thanks in advance for any insight or advice!
Cheers,
Matt Stuehler
I've created a word document that contains an embedded chart (using Insert >
Picture > Chart) The chart's layout optin is "In front of text".
What I'd like to do change/modify the data in the datasheet of this chart
using vba or vbscript, but I don't know how to reference it.
I've done the same thing in PowerPoint with this:
Set oApp = CreateObject("Powerpoint.Application")
Set oPres = oApp.Presentations.Open("C:\Presentation.ppt")
Set oSlide = oPres.Slides("slide1")
Set oChart = oSlide.Shapes("chart")
with (oChart..OLEFormat.Object.Application.DataSheet)
.Range("A1").Value = 100
End With
But I don't understand the object model of word well enough to do this in
Word. I also don't know how to name objects in Word so that I can reference
them.
Many thanks in advance for any insight or advice!
Cheers,
Matt Stuehler