How to apply a background to all pages at once vice "Page Setup" on each?

Started by jchambers, June 19, 2013, 04:00:21 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jchambers

Hello, thanks in advance for insights.

I did search this "General topic" forum and paged through all the hits on background, but did not see this specific point.  All apologies if I'm duplicating another question.

I know how to create a background, and how to add it to any other page via Page Setup.

But is it possible to add a background to all pages at once, instead of having to add it to each page one-at-a-time?

I've "inherited" a Visio for my employer's processes totaling around 300 pages.  It is in desperate need of a background for displaying page number/section detail/page titles, etc., to make it more accessible/navigable for our many users.  Ideally I will NOT have to do 'Page setup' 300 separate times to apply the background!    :P

Again-- thanks in advance for all insights.
JC

vojo

I think you need write a macro for something like that

If you are new to VBA, its probably easier to update 300 pages manually (unless you want to get good at VBA)

Might be able to use macro recorder to help the effort (might go along way to wading thru the minutia).

jchambers

Vojo-- thank you for your response.  Alas, I had suspected that it was not standard functionality (although it seems to me as though it should be!).

Thanks for the VBA and macro suggestions.  As a note, another coworker here has suggested a short-term work-around of PDFing the Visio, then using Acrobat Pro to add the desired annotations to the PDF.  Later I will either update all 300 in Visio separately or actually learn to code some VBA.  My current VBA expertise amounts to reading/analyzing VBA code, find something similar to what I need, then copy/paste/tweak/save.

vojo

So if want to go where angels fear to tread....you could consider this

- Assume there is common shape on every page (page number, square, whatever)
- Go into document stencil and edit that shape
    - Say its a square
    - edit it to add all the stuff you want to show up on the backround page
    - save it

So all the pages with that old shape will show new shape (old shape + background stuff)

Wont kid you....subtleties could kill this quickly....for example, if background stuff needs to go behind foreground stuff and old shape needs stay on in foreground, then, the pages this occurs, would need to update (one way around that is set all the background stuff well outside the region where shapes live....keep old shape where its at but put background stuff say 400mms to right of it).

But, maybe worth exploring.

Jumpy

As for the VBA solution.

If you have made a background page with everything you need (pagenumbering fields and so on) and if every normal page or foreground page is cleared of everything that now resides in the background page you can use the following code:



const BackPageName="Name of your Backpage"

Sub AddingBackground()
  Dim pg as Page
  For Each pg in ActiveDocument.Pages
    If not pg.Background Then                         '//=>pg is a foreground page
      pg.Backpage=BackPageName
    End If
  Next pg
End Sub


That's all there is.
Eventually you need sth. to identify each foreground page: If not every foreground page gets assigned the same background page for example.



Some Links:
http://msdn.microsoft.com/en-us/library/office/ms428029%28v=office.12%29.aspx

http://msdn.microsoft.com/en-us/library/office/ms428018%28v=office.12%29.aspx

jchambers

Quote from: Jumpy on June 20, 2013, 03:31:33 PM
As for the VBA solution.

If you have made a background page with everything you need (pagenumbering fields and so on) and if every normal page or foreground page is cleared of everything that now resides in the background page you can use the following code....


Jumpy-- many thanks!  I will try that before I resign myself to manual entry...