Background Pages - Applying on Print Margins

Started by JStoltz, March 07, 2014, 07:20:09 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

JStoltz

Hello All,

I'm working on a project where I'm interpreting entries in a SQL database and regurgitating a visio flow diagram. Shapes are drawn programmatically using VBA, and connectors are also drawn to build the chart from scratch.  When all is said and done, I will be physically printing these charts out, so I want to have a very standard title block on the bottom of each page with necessary information in it.

The problem I'm having here is that many of these charts tend to be larger than the 11"x17" print format I am using.  I've noticed that the background pages, when used, apply to the entire "Page Tab" within Visio and not to each printed page. For example, a flow chart takes up two 11"x17" tabloids. In Visio, I can see the page break. However, the background is applied across the page break such that the header appears at the top of the first page (and not the second page) and the footer appears at the bottom of the second page (and not the first page).

So, the question: Is there any good way  to set up a background that is applied to each printed page?

Thanks!

Yacine

I've never worked with headers and footers, so I can't say how good they are.
What I do, is use background pages. You can set them manually or by code.
If as in your case, there are pages of different sizes, then prepare according background pages and depending on the size of the actual drawing page set the one or the other background.
Yacine

wapperdude

I don't believe you can do what you want, that is, when a Visio page is larger than printed sheet, and splits into two printed sheets, to have each printed sheet with a different page number.  Visio considers it a single page.

Not sure that you'd want to do that anyway from a document perspective as it unnaturally inflates the page count.  This would be a problem for (a) document control, and (b) concurrent use of printed versions along with a video presentation version.  After the split, the hard copy and electronic copy page numbers would lose "sync", e.g., page 29 on hard copy would be page 28 on electronic copy.  Becomes confusing.

The work-around would be to actually split that page into two pages. 

Wapperdude

Visio 2019 Pro

Yacine

@Wapperdude, from your answer I thought that I misunderstood the question, so I read carefully again.
It's just so that some "tab pages" go on one page and others on two.
So basically there will be a document with different page sizes (eg. 11"x17" and 17"x22" (?) )
Yacine

wapperdude

My interpretation was that a "tab" page was a single Visio drawing page.  Each page has a background page.  Some of the tab pages had to be as large (or larger) than two 11x17 printed pages (sheets).  So, if a tab page and it's background are 22x17, and, if the printed sheet size is 11x17, then, Visio will use two 11x17's to print the 22x17.  The preview will show sheet 1 with the left half of the drawing page and sheet 2 with the right half of the drawing page.  There will be one title block, located on sheet 2.  Both sheets constitute a single drawing page.

The request, then, as I understand, is to have a title block on each printed sheet, and, in addition, each printed sheet to have unique page numbers.

If my interpretation is wrong, my sincere apologies.

...and yes, Yacine, you are of course correct, that there must be a properly sized background page for each main Visio page that is set to use a background page.


Wapperdude
Visio 2019 Pro

JStoltz

#5
Thanks for the responses, all. I was out of town this past week so I apologize for my own delay in responding.

Wapperdue's interpretation is correct. The desire is to treat printed sheets as separate, numbered "print pages". Each numbered "print page" would have its own title block displaying general info as well as the page number. Here's an example:


  • Diagram 1, on Visio "Page Tab" 1:  11x17. This would print to one tabloid, with a title block displaying "Diagram 1, Pg 1 of 1"
  • Diagram 2, on Visio "Page Tab" 2:  22x17. This would print to two tabloids, each with a title block. The first would say "Diagram 2, Pg 1 of 2" and the second would say "Diagram 2, Pg 2 of 2"
  • Diagram 3, on Visio "Page Tab" 3:  11x17. This would print to one tabloid, with a title block displaying "Diagram 3, Pg 1 of 1"

What I was hoping for was some type of Visio object that I could get at with VBA in order to mimick the behavior of the footer. Unfortunately the footer options are very limited when accessed within the Visio designer.

EDIT: So, to clarify... the page numbers when printed do not need to be unique (There would be as many "Page 1 of X" pages as there are page tabs, for example). The distinct pieces are the page tabs, I just want to be able to automate a title block in the footer of each printed sheet within a page tab, not just the very last sheet in the page tab.

wapperdude

Couple of things...
1.)  I don't have V2010 or newer, so cannot say with certainty that it's automatic page expansion would cover this.  I suspect not.
2.)  The identifying of multiple pages per diagram would have to be part of the page definition process and not the page printing process.  Those are two independent processes, the page printing is just a "scribe, dice, and print" regardless of what you do to the real pages.  So, that means there must be some restrictions on printing to prevent non-conformal cases.  For example (extreme and unlikely), you could setup all your 11x17 printing pages to do exactly what you want, and then someone come along and print everything on 5x7. 
3.)  It might be easier to create a directory for the project, and then treat each diagram as a separate entity.  Still might be tricky to spread a schematic over multiple pages, but, seems like that's a possibility and having separate title blocks for each page.

4.)  Someone other than me, with more VBA experience, will have to address the issue of setting page numbers via code.  But much of that is built-in, hidden code, and I suspect Visio is not to receptive to allowing it's internal code from being over-written.  That being the case, does open the possibility of developing your own custom header/footer/title blocks with custom code.

Just some rambling thoughts.
Wapperdude

Visio 2019 Pro

JStoltz

Thanks again for all the responses, everyone.

What I ended up doing to get the desired behavior was something like this:


Dim PagObj as Visio.Page
TotalPages = (((PagObj.PageSheet.Cells("PageHeight") - 0.25) \ 16.5))


to determine the total number of printed sheets that I would have for that Visio "Page"/Tab. The title blocks/footers/headers etc that I wanted to add to each page were then added at the origin of the document, and at n vertical increments of 16.5" where n was TotalPages.

It required a fair amount of overhead but has done a pretty good job of providing the "per sheet" background functionality I had wanted.