Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Chris[_3_] Chris[_3_] is offline
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default 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   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Chris[_3_] Chris[_3_] is offline
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default 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

Posting Rules

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Automatically Generating Customised Footer in Templates Louise Microsoft Word Help 8 July 9th 06 07:59 PM
generating Reports using VB.net z Mailmerge 2 May 3rd 06 11:32 AM
Generating shortcut sjb Microsoft Word Help 3 January 12th 06 05:58 PM
generating doc variants G. L. New Users 0 March 29th 05 09:10 AM
Generating Random Numbers Phil K Microsoft Word Help 1 December 8th 04 02:45 PM


All times are GMT +1. The time now is 11:53 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"