Multiple bookmarks to hold the same value

M

mr_ocp

Hi
I have to automate a fairly large report in MS Word to be created from
MS Access using VBA, I will be using a template for that, to start
with, the each page of report has a header containing month, year for
the reporting month which is always the last month ended for example
April, 2004.

What would be the best approach to place this value on each header,
how can I create an array of bookmarks in the template and insert the
month into them all with minimum amount of code, or is there a way to
automae it within the template to fill these bookmarks/spots
automatically when the template is invoked from access but the values
should remain static once the template is saved as the month's report
document.

Thanks a bunch
 
D

Doug Robbins - Word MVP

I'm not quite sure that I have understood your question correctly, but if
what you are after is a way to have the Month in which the report is created
appear in the header, this can be done simply by inserting a

{ CREATEDATE \@ "MMMM, yyyy" }

field in the template from which the report is prepared.

That assumes that the report is prepared by using

Documents.Add "templatename"

--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top