Template - custom heather and footer on new page

Started by kiler40, May 31, 2014, 03:53:33 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

kiler40

Hello All !
From some time i`m starting to understand the beautiy (took me some time  :-[ ) of templates.
But i cant find - if possible - how can i add a new page in a template generated file and to have the same shapes (i use them as heather and footer) in the page. i know i can copy/paste them, or drag them from stencil...
but the question is - can they be there by default on every new page in the document ?
And the shapes are active, so - no they can`t be added in the background...

Any ideas ?

thanks in advance :)

Yacine

Hi Andrei,
you may check the page added event.
There you could use a drop shape.
The shape could be a group stored in a stencil, after dropping, you could ungroup it and have all the shapes you need.
Yacine

kiler40

Hi Yacine,
this i know.. but i was wondering if there is an option on creation of the page the shapes to be there :)

Yacine

This would get us to the idea of page templates. Nice thought.
Yacine

kiler40

at this point is seems i don`t know something.
i`ve attached the file, and when i hit the "insert page" the heather and footer is not there...


wapperdude

In your template, add a background page.  Move your header and footer to the new background page.

Now, edit the page-1 to change it's properties to include the background page.

Whenever you add a new drawing page, it will inherit the properties from page-1 which will include the background page, and thus your header / footer.

Wapperdude
Visio 2019 Pro

kiler40

OK ! now i get it !
but there is problem now. the heather and the footer are active (the footer at this moment no - but i`m working on it :) )
at least they are re-sizing if the page orientation change from portrait to landscape. and if they are in the background they become inactive

Also there is a macro (about it i write a topic in the past) that paste special some excel sheet and fits the page according to the needs of the pasted information.

wapperdude

#7
Background sheet doesn't change orientation normally.  You would need both portrait and landscape versions, or perhaps some code that would make the background track the foreground page.  Never tried that though.

Wapperdude

PS> Found this code written by John Marshall, MVP: 
Public Sub ChangePageSize()

ActivePage.Shapes("thePage").Cells("PageWidth").Formula = 7.5
ActivePage.Shapes("thePage").Cells("PageHeight").Formula = 15


End Sub


John...    Visio MVP

http://www.office-archive.com/72-visio-vba/1cab622edc18b649.htm



Should be able to adapt it set the size of background page.
Visio 2019 Pro