Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can you insert a fomular into a word "footer" using VBD

Status
Not open for further replies.

blitzzuk

Programmer
Nov 19, 2002
2
GB
Task:
I like to COPY this function into the Footer of a word document: { IF { PAGES } = { NUMPAGES} "print this text"}
simple formular, it put a footer only onto the last page of a document.

Problem:
Putting it into the actual Word Document Footer using "CTRL F9" etc manually, works perfectly for that one document. But I would like to put this into the normal.dot, so when the document loads, the function is already there.

Outcome sofar: It executes the code and displaying the result. I need to have the full function COPIED into the footer when loading the document.

Any suggestion. I saw some really good answers in this forum to other problems. Question now, is it possible, to programm functions into the footer section. Thank you
for you help. A workaround, dirty trick... anything that works is much appreciated.

best regards Bernd Hallmann
 
Close any open documents(not really necessary, but wise)

Open the template Normal.dot and place your if statement.

Save and close the template.

Create a new document - and - Voila!

This may not be exactly what you want as I think you're doing a MailMerge. I'm I correct?

Darrell
'We all must do the hard bits so when we get bit we know where to bite' :)
 
I meant to ask - Am I correct? RE: Whether you are performing a Mail-Merge.

Darrell 'We all must do the hard bits so when we get bit we know where to bite' :)
 
Hallo Darrell

I apologize for taking so long to answer. I have tried your hints, which work well when creating a new document from normal.dot. However, using this document afterwards for mail merging, the code is then executed. The function is gone.

I have therefore created a macro in normal.dot with my own print button, this way I can printout each page singlely, when hitting the last page, opening the footer, inserting the text, printing the page and remove the footer again.

It was a good solution, as it does not now interfere with other normal letters I want to write.

Thanks for you help, it did teach me quite a lot of Word anyway.

regards Bernd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top