Set a visio page as background of another page with python

Started by Lazyman, September 26, 2020, 09:29:30 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Lazyman

Hi visio guys!
I have just registered and I have a question. I want to set a visio page (PAGE1) as background of another page called PAGE2 (within the same document) using Python. I've tried first to catch the right parameter via the visio shapesheet by putting ON/OFF the page background but I don't see any corresponding parameters.
Any hint would be appreciated. Thanks.

vojo

I believe that has to be done with VBA.  Several examples on the web

Lazyman

Thanks vojo for the feedback. But as I said, I am programming in python and I have thought about 2 options:
1- place PAGE1 as background of PAGE2, this is the one I prefer Or,
2- select all the shapes from PAGE2 and copy them to PAGE1.
Some visioguys can help for option 2 or 1 if ever
?


Nikolay

Quote from: Lazyman on September 26, 2020, 09:29:30 PM
Hi visio guys!
I have just registered and I have a question. I want to set a visio page (PAGE1) as background of another page called PAGE2 (within the same document) using Python. I've tried first to catch the right parameter via the visio shapesheet by putting ON/OFF the page background but I don't see any corresponding parameters.
Any hint would be appreciated. Thanks.

Assuming you want to make page2 background page for page1, it looks straightforward (assuming you are using Visio API to manipulate the drawing):

page2.Background = 1
page1.BackPage = page2

Am I missing something?

Lazyman

Hi,
No Nikolai, you are not missing something because this is exactly what I was looking for. I tested it and it worked perfectly thanks a lot