#1   Report Post  
Posted to microsoft.public.word.docmanagement
Steve Paul
 
Posts: n/a
Default document path footer

I have created a VBA script to automatically add the document path to the
footer of every page. When it works, it works OK, but it has the following
problems:

depending on how the document is opened it doesn't always run
the formatting inherits the existing footer formatting instead of
maintaining its' own

does anybody know of a good macro to handle all this, or a 3rd party product
that will do it ?
--
Steve Paul
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Jay Freedman
 
Posts: n/a
Default document path footer

Hi Steve,

This is a really bad case of reinventing the wheel.

In the template used to create your documents, open the footer area.
On the Header/Footer toolbar, click the AutoText button and select
"Filename and path". That inserts a field that does the job. (Or you
can insert the FileName field through the Insert Field dialog, and
include the \p switch to show the path.) You can format the field as
you like.

Save the template, and use File New to create new documents based on
it. Each document will automatically show its path and filename once
it's been saved (although you may have to switch to Print Preview and
back or manually select the field and press F9 to update it).

One caution: If you ever use the Label wizard, don't put anything in
the footer of the Normal.dot template because that will interfere with
the labels.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.

On Thu, 22 Dec 2005 10:41:01 -0800, "Steve Paul"
wrote:

I have created a VBA script to automatically add the document path to the
footer of every page. When it works, it works OK, but it has the following
problems:

depending on how the document is opened it doesn't always run
the formatting inherits the existing footer formatting instead of
maintaining its' own

does anybody know of a good macro to handle all this, or a 3rd party product
that will do it ?

  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Steve Paul
 
Posts: n/a
Default document path footer

Thanks for the info, but unfortunately I don't believe this solution helps
with the 20,000 documents I have already created, many of which have
pre-existing footers.

The requirement is that every word document printed includes a file path
footer. Which means I need some programmatic means to insert this field info
to every document before it is printed
--
Steve Paul


"Jay Freedman" wrote:

Hi Steve,

This is a really bad case of reinventing the wheel.

In the template used to create your documents, open the footer area.
On the Header/Footer toolbar, click the AutoText button and select
"Filename and path". That inserts a field that does the job. (Or you
can insert the FileName field through the Insert Field dialog, and
include the \p switch to show the path.) You can format the field as
you like.

Save the template, and use File New to create new documents based on
it. Each document will automatically show its path and filename once
it's been saved (although you may have to switch to Print Preview and
back or manually select the field and press F9 to update it).

One caution: If you ever use the Label wizard, don't put anything in
the footer of the Normal.dot template because that will interfere with
the labels.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.

On Thu, 22 Dec 2005 10:41:01 -0800, "Steve Paul"
wrote:

I have created a VBA script to automatically add the document path to the
footer of every page. When it works, it works OK, but it has the following
problems:

depending on how the document is opened it doesn't always run
the formatting inherits the existing footer formatting instead of
maintaining its' own

does anybody know of a good macro to handle all this, or a 3rd party product
that will do it ?


  #4   Report Post  
Posted to microsoft.public.word.docmanagement
Jay Freedman
 
Posts: n/a
Default document path footer

Hi Steve,

If you had mentioned at the beginning that you needed to affect
existing documents, I would have answered differently.

Regarding the problem with the code not running depending on how the
document is opened: I assume you put the code in an AutoOpen macro.
The article at http://support.microsoft.com/?kbid=286310 explains the
behaviors you can expect. A solution may be to get rid of the AutoOpen
macro and instead intercept the FilePrint and FilePrintDefault
commands
(http://www.word.mvps.org/FAQs/Macros...tSavePrint.htm) to
insert the field just before printing.

Alternatively, you could adapt the code in
http://www.word.mvps.org/FAQs/MacrosVBA/BatchFR.htm to put the field
into every document. If you try this, beware of read-only documents,
password-protected documents, and other pitfalls.

Regarding the formatting: What code are you using to insert the path
now? There are several strategies for fixing the formatting of
inserted text, but which one is easiest depends on what you're already
doing.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.

On Thu, 22 Dec 2005 13:19:03 -0800, "Steve Paul"
wrote:

Thanks for the info, but unfortunately I don't believe this solution helps
with the 20,000 documents I have already created, many of which have
pre-existing footers.

The requirement is that every word document printed includes a file path
footer. Which means I need some programmatic means to insert this field info
to every document before it is printed
--
Steve Paul


"Jay Freedman" wrote:

Hi Steve,

This is a really bad case of reinventing the wheel.

In the template used to create your documents, open the footer area.
On the Header/Footer toolbar, click the AutoText button and select
"Filename and path". That inserts a field that does the job. (Or you
can insert the FileName field through the Insert Field dialog, and
include the \p switch to show the path.) You can format the field as
you like.

Save the template, and use File New to create new documents based on
it. Each document will automatically show its path and filename once
it's been saved (although you may have to switch to Print Preview and
back or manually select the field and press F9 to update it).

One caution: If you ever use the Label wizard, don't put anything in
the footer of the Normal.dot template because that will interfere with
the labels.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.

On Thu, 22 Dec 2005 10:41:01 -0800, "Steve Paul"
wrote:

I have created a VBA script to automatically add the document path to the
footer of every page. When it works, it works OK, but it has the following
problems:

depending on how the document is opened it doesn't always run
the formatting inherits the existing footer formatting instead of
maintaining its' own

does anybody know of a good macro to handle all this, or a 3rd party product
that will do it ?


Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Footer filename change everytime you save new document from Templ Lisanna Page Layout 2 August 14th 07 09:54 AM
Footer filename change everytime you save new document from Templ garfield-n-odie Page Layout 0 November 10th 05 12:28 AM
'document or path name is not valid' when trying to open word doc gorbichof Microsoft Word Help 4 August 29th 05 06:52 AM
How do I insert and path to find my document in word? ME Microsoft Word Help 2 February 23rd 05 09:53 PM
Change Footer on pg 2 to be different then the footer on pg 1 Ted Microsoft Word Help 5 January 19th 05 05:45 PM


All times are GMT +1. The time now is 08:12 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"