Adding page from another drawing

N

Nikolay Belyh

How do I add a page in one Visio drawing from ANOTHER Visio drawing?

"Copy-Paste" shapes is not a suitable option (for me), because it can
break (some) page formulas.
I want the original page in a new drawing exactly as-is, including all
it's formulas, sizes, settings, etc.

Is there an easy way to accomplish this? For me "easy" means that I
won't have to copy original page's properties and settings
"manually"... And, I want to do this programmtically. Is it possible?

Kind regards, Nikolay.
 
A

AlEdlund

Sure, it's doable via code. Paul Herber has some utilities that can perform
it. There's maybe a half dozen properties from the pagesheet that will have
to be copied along with the shapes. In my experience it's best to just
select everything, then group the selection, and then copy the object rather
than try to do it an element at a time.
al
 
N

Nikolay Belyh

Thank you, Al!

Found the "Copy page to another document" function in Super Utilities.
Can Paul reveal the idea of the implementation? ;)

The point is, the "select, group and copy" sequence sometimes just
can't be easily done - some shapes might be protected against
selection or grouping.. So first we would probably need to remember
them, then unlock them, then copy, lock them again... which does not
sound any fun... :)

I thought about obtaining "IDataObject" of the page, and then just
dropping "it" onto new page instead of using Selection.. I wonder how
the "native" Visio's function "Copy Drawing" works? I guess it might
be implemented something like that..?

Kind regards, Nikolay.
 
P

Paul Herber

Thank you, Al!

Found the "Copy page to another document" function in Super Utilities.
Can Paul reveal the idea of the implementation? ;)

Much hard work of coding. :)
The function can be called from your own code, details are in the help
file.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top