Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to keep graphics in Word
Message
From
10/08/2007 15:24:08
 
 
To
10/08/2007 14:55:01
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP1
Miscellaneous
Thread ID:
01247489
Message ID:
01247499
Views:
23
This message has been marked as a message which has helped to the initial question of the thread.
>I'm creating a graph in Word, by creating a canvas and then adding lines, dots, tiny circles, textboxes etc. The graph is of a very special nature, so please don't recommend other graphing tools, thanks, they just can't do this. This actually works quite nicely in Word.
>
>The problem arises when I try to add a page - this report is supposed to have one graph per page. When I do
>
>oDoc.InsertBreak(wdPageBreak)
>
>oDoc.Shapes.Count goes to zero. IOW, my canvas vanishes. Tried other things - add a paragraph, select it, create a canvas, it anchors to the paragraph, but the paragraph text vanishes. Then I try to set the paragraph's text, the canvas vanishes.
>
>Is there any system to this? I'd like to just build the document, not to hunt its vanishing parts.

This is a SWAG, but what might be happening is that, when you fire the command to create a new page, the "focus" is still on your graphic, so it's replaced by the Page Break. Maybe you could try moving the "focus" off your graphics (e.g. by adding a CRLF just after them) and then try the page break.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform