Saving Document Page in Visio 2003 Programaticly

Started by daunter, March 11, 2011, 04:04:37 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

daunter

Hi everyone ,

I have a visio document that contains several pages. I wonder saving a page(just a page of document) is possible or not ?

All suggestions will be appreciated ...


AndyW

Nothing built in.

1. You could create a new document, select everything on the page you want, copy and paste it to the new page.

2. Copy the entire document and delete the pages you don't want.
Live life with an open mind

daunter

Thank u AndyW ,

Actually my problem is "Copy the entire document and delete the pages you don't want." How can i copy a document from one to another ? I can only assign one , however in this case the operations that i do in the second document effects the orginal one.

Isn't there a method like DataTable.Copy() in Visio Model?

Jumpy

Maybe I Don't understand the problem, but with copying the entire document AndyW meant simply saving it with another name, I guess...

AndyW

Yes, I would save your current document, then delete the pages you don't want and then do a SaveAs (Note, this will become your current document in Visio).

Alternatively, you could use the CopyDrawing method,

Position to the page you want top copy

    Application.ActiveWindow.Selection.Copy

Open your new diagram and position to your new page and paste it in.

    Application.ActiveWindow.Page.Paste

You would need to copy acreoss any page settings from your old page, e.g. page size etc.
Live life with an open mind

daunter

Thank u AndyW ,

I implemented your first suggestion , and succeed in.

AndyW

Live life with an open mind