>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