Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Generating Footer
Hi Group,
From access I am generating standard letters (word documents). When the letter is opened I would like to alter the footer depending on a specific value in the database. IF Value = a Then document.footnote = "Some Text" Else document.footnote = "Hello World" End If I don't know if I am better to do this in a macro from Word. Could someone please advise? Thanks |
#2
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Generating Footer
IMHO, it is better to manipulate data in a database rather than a word
processor. Therefore, I would use and IIF function in a query in Access to text the value in the field and return the appropriate text. If can also be done with an If...then...Else field construction in Word, but it will then probably be necessary to update the fields in the footer to get the appropriate text to be displayed. -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "Chris" wrote in message ... Hi Group, From access I am generating standard letters (word documents). When the letter is opened I would like to alter the footer depending on a specific value in the database. IF Value = a Then document.footnote = "Some Text" Else document.footnote = "Hello World" End If I don't know if I am better to do this in a macro from Word. Could someone please advise? Thanks |
#3
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Generating Footer
Hi Doug,
Sorry if my post wasn't clear. I don't want to input data via the Word document, The word document is going to be a letter. When the database is run the bookmarks are populated, at which point I would like the footer to be determined by the value of who has created the letter.i.e. IF the bookmark on the letter for 'Name' = John Then Footer = Johns Details I don't know how to alter the footer through VBA in access so thought I'd try a macro in Word however if you could point me in the right direction using Access, it would be greately appreacited. Thanks. "Doug Robbins - Word MVP" wrote in message ... IMHO, it is better to manipulate data in a database rather than a word processor. Therefore, I would use and IIF function in a query in Access to text the value in the field and return the appropriate text. If can also be done with an If...then...Else field construction in Word, but it will then probably be necessary to update the fields in the footer to get the appropriate text to be displayed. -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "Chris" wrote in message ... Hi Group, From access I am generating standard letters (word documents). When the letter is opened I would like to alter the footer depending on a specific value in the database. IF Value = a Then document.footnote = "Some Text" Else document.footnote = "Hello World" End If I don't know if I am better to do this in a macro from Word. Could someone please advise? Thanks |
#4
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Generating Footer
You do not need VBA. You create a query in Access that would include a
field containing an expression such as: Footer: IIF([Name] = "John", "Johns Details", "Hello World") Then you use that query as the data source for your mailmerge and in the footer of the document, you insert the Footer field. -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "Chris" wrote in message ... Hi Doug, Sorry if my post wasn't clear. I don't want to input data via the Word document, The word document is going to be a letter. When the database is run the bookmarks are populated, at which point I would like the footer to be determined by the value of who has created the letter.i.e. IF the bookmark on the letter for 'Name' = John Then Footer = Johns Details I don't know how to alter the footer through VBA in access so thought I'd try a macro in Word however if you could point me in the right direction using Access, it would be greately appreacited. Thanks. "Doug Robbins - Word MVP" wrote in message ... IMHO, it is better to manipulate data in a database rather than a word processor. Therefore, I would use and IIF function in a query in Access to text the value in the field and return the appropriate text. If can also be done with an If...then...Else field construction in Word, but it will then probably be necessary to update the fields in the footer to get the appropriate text to be displayed. -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "Chris" wrote in message ... Hi Group, From access I am generating standard letters (word documents). When the letter is opened I would like to alter the footer depending on a specific value in the database. IF Value = a Then document.footnote = "Some Text" Else document.footnote = "Hello World" End If I don't know if I am better to do this in a macro from Word. Could someone please advise? Thanks |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Automatically Generating Customised Footer in Templates | Microsoft Word Help | |||
generating Reports using VB.net | Mailmerge | |||
Generating shortcut | Microsoft Word Help | |||
generating doc variants | New Users | |||
Generating Random Numbers | Microsoft Word Help |