A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » Mailmerge
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Can "content" be incorporated into a REF field?



 
 
Thread Tools Display Modes
  #1  
Old April 3rd, 2010, 06:53 PM posted to microsoft.public.word.mailmerge.fields
DeeDeeCee
external usenet poster
 
Posts: 62
Default Can "content" be incorporated into a REF field?


I have a letter template in which the " xxxx" line sometimes should
include an account number. I can put in a REF field that will automatically
enter the account number from another place in the document, with a bookmark
around it. I want to have the language "Account Number" in front of the
actual number in the xxxx line, if I do so.

The problem is that sometimes there is no account number, and in those cases
I DON'T want the words "Account Number" to appear, as there will be nothing
after it.

Thanks for any advice.

ddc

Is there any way to set up the template and/or the REF field so that if
there is an account number, the words "Account Number" appear, followed by
the actual number...but if there is no account number in the bookmark, then
nothing at all appears in the xxxx line?
  #2  
Old April 3rd, 2010, 10:51 PM posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP
external usenet poster
 
Posts: 8,239
Default Can "content" be incorporated into a REF field?

{ IF { REF [bookmark] } "" " Account Number { REF [bookmark] }" "" }

You must use Ctrl+F9 to insert each pair of field delimiters { } and use
A;t+F9 to toggle off their display.

--
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, originally posted via msnews.microsoft.com

"DeeDeeCee" wrote in message
...

I have a letter template in which the " xxxx" line sometimes should
include an account number. I can put in a REF field that will
automatically
enter the account number from another place in the document, with a
bookmark
around it. I want to have the language "Account Number" in front of the
actual number in the xxxx line, if I do so.

The problem is that sometimes there is no account number, and in those
cases
I DON'T want the words "Account Number" to appear, as there will be
nothing
after it.

Thanks for any advice.

ddc

Is there any way to set up the template and/or the REF field so that if
there is an account number, the words "Account Number" appear, followed by
the actual number...but if there is no account number in the bookmark,
then
nothing at all appears in the xxxx line?


  #3  
Old April 3rd, 2010, 11:28 PM posted to microsoft.public.word.mailmerge.fields
Herb Tyson [MVP]
external usenet poster
 
Posts: 3,614
Default Can "content" be incorporated into a REF field?

When I tested that here a while ago, I found that if [bookmark] doesn't
exist, the expression resolves as FALSE. I'm guessing {Ref [bookmark]} must
return an error message (internally). So, if the account number doesn't
appear, the user will need to bookmark a point in the document, so it can
properly compare as TRUE to "" when there is no account number.

--
Herb Tyson MS MVP
Author of the Word Bible
Blog: http://word.herbtyson.com
Web: http://www.herbtyson.com

"Doug Robbins - Word MVP" wrote in message
...
{ IF { REF [bookmark] } "" " Account Number { REF [bookmark] }" "" }

You must use Ctrl+F9 to insert each pair of field delimiters { } and use
A;t+F9 to toggle off their display.

--
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, originally posted via msnews.microsoft.com

"DeeDeeCee" wrote in message
...

I have a letter template in which the " xxxx" line sometimes should
include an account number. I can put in a REF field that will
automatically
enter the account number from another place in the document, with a
bookmark
around it. I want to have the language "Account Number" in front of the
actual number in the xxxx line, if I do so.

The problem is that sometimes there is no account number, and in those
cases
I DON'T want the words "Account Number" to appear, as there will be
nothing
after it.

Thanks for any advice.

ddc

Is there any way to set up the template and/or the REF field so that if
there is an account number, the words "Account Number" appear, followed
by
the actual number...but if there is no account number in the bookmark,
then
nothing at all appears in the xxxx line?


  #4  
Old April 4th, 2010, 07:12 AM posted to microsoft.public.word.mailmerge.fields
Graham Mayor
external usenet poster
 
Posts: 18,297
Default Can "content" be incorporated into a REF field?

If the bookmark does not exist a further test is required

{ IF { REF Number } "Error!*" "{ IF { REF Number } "" " Account
Number { REF Number }" } }

where Number is the bookmark name.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org




"Herb Tyson [MVP]" wrote in message
...
When I tested that here a while ago, I found that if [bookmark] doesn't
exist, the expression resolves as FALSE. I'm guessing {Ref [bookmark]}
must return an error message (internally). So, if the account number
doesn't appear, the user will need to bookmark a point in the document, so
it can properly compare as TRUE to "" when there is no account number.

--
Herb Tyson MS MVP
Author of the Word Bible
Blog: http://word.herbtyson.com
Web: http://www.herbtyson.com

"Doug Robbins - Word MVP" wrote in message
...
{ IF { REF [bookmark] } "" " Account Number { REF [bookmark] }"
"" }

You must use Ctrl+F9 to insert each pair of field delimiters { } and use
A;t+F9 to toggle off their display.

--
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, originally posted via msnews.microsoft.com

"DeeDeeCee" wrote in message
...

I have a letter template in which the " xxxx" line sometimes should
include an account number. I can put in a REF field that will
automatically
enter the account number from another place in the document, with a
bookmark
around it. I want to have the language "Account Number" in front of the
actual number in the xxxx line, if I do so.

The problem is that sometimes there is no account number, and in those
cases
I DON'T want the words "Account Number" to appear, as there will be
nothing
after it.

Thanks for any advice.

ddc

Is there any way to set up the template and/or the REF field so that if
there is an account number, the words "Account Number" appear, followed
by
the actual number...but if there is no account number in the bookmark,
then
nothing at all appears in the xxxx line?




 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 01:07 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.