Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / March 2007

Tip: Looking for answers? Try searching our database.

Generating Footer

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Chris - 21 Mar 2007 11:38 GMT
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
Doug Robbins - Word MVP - 21 Mar 2007 13:57 GMT
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.

Signature

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

> Hi Group,
>
[quoted text clipped - 12 lines]
> Could someone please advise?
> Thanks
Chris - 21 Mar 2007 14:18 GMT
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.

> IMHO, it is better to manipulate data in a database rather than a word
> processor.
[quoted text clipped - 22 lines]
>> Could someone please advise?
>> Thanks
Doug Robbins - Word MVP - 22 Mar 2007 08:17 GMT
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.

Signature

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

> Hi Doug,
>
[quoted text clipped - 37 lines]
>>> Could someone please advise?
>>> Thanks
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.