Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Making a graph
Message
From
27/09/2001 17:53:59
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
27/09/2001 15:27:09
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Title:
Miscellaneous
Thread ID:
00525325
Message ID:
00561717
Views:
31
Glad it worked :) Seeing the properties I think it's MsGraph not MSchart2.0. If you can try I found it much faster. To be able to add to a word doc invoke controls toolbar and click control toolbox icon. Then a list of activex controls shows up (very rarely using word from enduser viewpoint it was hard to figure for me:)
Cetin

>Thanks, you got me started. I think DoVerb is the key. This seems to work.
>
>oWord = createobject("word.application")
>oWord.Documents.Open("c:\junk.doc")
>oWord.ActiveDocument.Bookmarks("B_ChartOne").Select
>oWord.Selection.InlineShapes(1).OLEFormat.DoVerb
>
>oChart = oWord.Selection.InlineShapes(1).OLEFormat.Object
>oChart.ChartTitle.Caption="This is New Chart Title"
>oChart.Application.DataSheet.Range("A1").Value = 100
>oChart.Application.DataSheet.Range("A2").Value = 75
>oChart.Application.Quit
>
>oWord.ActiveDocument.Bookmarks("B_Title").Select
>oWord.Selection.TypeText("This is a Doc Title")
>oWord.ActiveDocument.PrintOut
>oWord.Quit(0)
>release oWord, oChart
>
>
>>Honestly not sure, I never tried it. Sounds like you would select it first then :
>>
>>oChart = oWord.Selection.ShapeRange(1).OLEFormat.Object
>>
>>Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform