#1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Nathan Franklin
 
Posts: n/a
Default MERGEFIELDS

Hello all,

When I do a mail merge with VB, I am trying to update a certain value on my
word document...
It is using an IF field... But on the new merged document it just appears
blank with no value

{ IF{MERGEFIELD PowerConnected } = 1 "Note: Power was connected at time of
inspection." "Note: Power was not connected at time of inspection." }

In the data I am passing PowerConnected does equal 1 ... is there anything
you could suggest....
thanks

Nathan


  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP
 
Posts: n/a
Default MERGEFIELDS

Most likely the fields in the document need to be updated.

--
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

"Nathan Franklin" wrote in message
...
Hello all,

When I do a mail merge with VB, I am trying to update a certain value on
my word document...
It is using an IF field... But on the new merged document it just appears
blank with no value

{ IF{MERGEFIELD PowerConnected } = 1 "Note: Power was connected at time of
inspection." "Note: Power was not connected at time of inspection." }

In the data I am passing PowerConnected does equal 1 ... is there anything
you could suggest....
thanks

Nathan



  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Charles Kenyon
 
Posts: n/a
Default MERGEFIELDS

Don't know that it matters, but you need a space after IF.
--
Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide

See also the MVP FAQ: http://word.mvps.org/FAQs/ which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.


"Nathan Franklin" wrote in message
...
Hello all,

When I do a mail merge with VB, I am trying to update a certain value on
my word document...
It is using an IF field... But on the new merged document it just appears
blank with no value

{ IF{MERGEFIELD PowerConnected } = 1 "Note: Power was connected at time of
inspection." "Note: Power was not connected at time of inspection." }

In the data I am passing PowerConnected does equal 1 ... is there anything
you could suggest....
thanks

Nathan



  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor
 
Posts: n/a
Default MERGEFIELDS

This should work as you have it. If you merge the document with
{Mergefield PowerConnected}
what result do you get, when you think you should be getting "1"?

--

Graham Mayor - Word MVP

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



Nathan Franklin wrote:
Hello all,

When I do a mail merge with VB, I am trying to update a certain value
on my word document...
It is using an IF field... But on the new merged document it just
appears blank with no value

{ IF{MERGEFIELD PowerConnected } = 1 "Note: Power was connected at
time of inspection." "Note: Power was not connected at time of
inspection." }
In the data I am passing PowerConnected does equal 1 ... is there
anything you could suggest....
thanks

Nathan



  #5   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Nathan Franklin
 
Posts: n/a
Default MERGEFIELDS

Graham,

I do get the value 1 if I just have that mergefield in the doc.... the
problme is I need to use IF statements to display the applicable thing based
on the value.... I dont get any format errors... But just no value appears
when useing the if statement...

im not sure what to do....

"Graham Mayor" wrote in message
...
This should work as you have it. If you merge the document with
{Mergefield PowerConnected}
what result do you get, when you think you should be getting "1"?

--

Graham Mayor - Word MVP

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



Nathan Franklin wrote:
Hello all,

When I do a mail merge with VB, I am trying to update a certain value
on my word document...
It is using an IF field... But on the new merged document it just
appears blank with no value

{ IF{MERGEFIELD PowerConnected } = 1 "Note: Power was connected at
time of inspection." "Note: Power was not connected at time of
inspection." }
In the data I am passing PowerConnected does equal 1 ... is there
anything you could suggest....
thanks

Nathan







  #6   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Nathan Franklin
 
Posts: n/a
Default MERGEFIELDS

i have an update on this

when putting this into my document

{ IF {MERGEFIELD PowerConnected } = 1 "Note: Power was connected at time of
inspection." "Note: Power was not connected at time of inspection." \*
MERGEFORMAT }

The value that gets printed when I do a mail merge is "PowerConnected"

the actual merge value (i have checked this) is 1.

Most likely the fields in the document need to be updated.

when and how do I update these fields... before or after the merge??

thanks
nathan


"Nathan Franklin" wrote in message
...
Hello all,

When I do a mail merge with VB, I am trying to update a certain value on
my word document...
It is using an IF field... But on the new merged document it just appears
blank with no value

{ IF{MERGEFIELD PowerConnected } = 1 "Note: Power was connected at time of
inspection." "Note: Power was not connected at time of inspection." }

In the data I am passing PowerConnected does equal 1 ... is there anything
you could suggest....
thanks

Nathan



  #7   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP
 
Posts: n/a
Default MERGEFIELDS

Was the If field constructed using Ctrl+F9 to insert the field delimiters?

--
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

"Nathan Franklin" wrote in message
...
i have an update on this

when putting this into my document

{ IF {MERGEFIELD PowerConnected } = 1 "Note: Power was connected at time
of inspection." "Note: Power was not connected at time of inspection." \*
MERGEFORMAT }

The value that gets printed when I do a mail merge is "PowerConnected"

the actual merge value (i have checked this) is 1.

Most likely the fields in the document need to be updated.

when and how do I update these fields... before or after the merge??

thanks
nathan


"Nathan Franklin" wrote in message
...
Hello all,

When I do a mail merge with VB, I am trying to update a certain value on
my word document...
It is using an IF field... But on the new merged document it just appears
blank with no value

{ IF{MERGEFIELD PowerConnected } = 1 "Note: Power was connected at time
of inspection." "Note: Power was not connected at time of inspection." }

In the data I am passing PowerConnected does equal 1 ... is there
anything you could suggest....
thanks

Nathan





  #8   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor
 
Posts: n/a
Default MERGEFIELDS

In that case I have been unable to reproduce the problem here. I have no
idea why this is not working if you have given us all the pertinent
information.

Have you tried it without your macro, by using the field construction in a
merge document and attaching your data file? If that works, it would suggest
that there is a problem with your vba coding.

--

Graham Mayor - Word MVP

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


Nathan Franklin wrote:
Graham,

I do get the value 1 if I just have that mergefield in the doc.... the
problem is I need to use IF statements to display the applicable
thing based on the value.... I don't get any format errors... But just
no value appears when using the if statement...

im not sure what to do....

"Graham Mayor" wrote in message
...
This should work as you have it. If you merge the document with
{Mergefield PowerConnected}
what result do you get, when you think you should be getting "1"?

--

Graham Mayor - Word MVP

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



Nathan Franklin wrote:
Hello all,

When I do a mail merge with VB, I am trying to update a certain
value on my word document...
It is using an IF field... But on the new merged document it just
appears blank with no value

{ IF{MERGEFIELD PowerConnected } = 1 "Note: Power was connected at
time of inspection." "Note: Power was not connected at time of
inspection." }
In the data I am passing PowerConnected does equal 1 ... is there
anything you could suggest....
thanks

Nathan



  #9   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Nathan Franklin
 
Posts: n/a
Default MERGEFIELDS

it was used by inserting the field... (in the Insert menu) and then select
the IF field option...

"Doug Robbins - Word MVP" wrote in message
...
Was the If field constructed using Ctrl+F9 to insert the field delimiters?

--
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

"Nathan Franklin" wrote in message
...
i have an update on this

when putting this into my document

{ IF {MERGEFIELD PowerConnected } = 1 "Note: Power was connected at time
of inspection." "Note: Power was not connected at time of inspection." \*
MERGEFORMAT }

The value that gets printed when I do a mail merge is "PowerConnected"

the actual merge value (i have checked this) is 1.

Most likely the fields in the document need to be updated.

when and how do I update these fields... before or after the merge??

thanks
nathan


"Nathan Franklin" wrote in message
...
Hello all,

When I do a mail merge with VB, I am trying to update a certain value on
my word document...
It is using an IF field... But on the new merged document it just
appears blank with no value

{ IF{MERGEFIELD PowerConnected } = 1 "Note: Power was connected at time
of inspection." "Note: Power was not connected at time of inspection." }

In the data I am passing PowerConnected does equal 1 ... is there
anything you could suggest....
thanks

Nathan







  #10   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Nathan Franklin
 
Posts: n/a
Default MERGEFIELDS

got it sorted
"Nathan Franklin" wrote in message
...
it was used by inserting the field... (in the Insert menu) and then select
the IF field option...

"Doug Robbins - Word MVP" wrote in message
...
Was the If field constructed using Ctrl+F9 to insert the field
delimiters?

--
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

"Nathan Franklin" wrote in message
...
i have an update on this

when putting this into my document

{ IF {MERGEFIELD PowerConnected } = 1 "Note: Power was connected at time
of inspection." "Note: Power was not connected at time of inspection."
\* MERGEFORMAT }

The value that gets printed when I do a mail merge is "PowerConnected"

the actual merge value (i have checked this) is 1.

Most likely the fields in the document need to be updated.
when and how do I update these fields... before or after the merge??

thanks
nathan


"Nathan Franklin" wrote in message
...
Hello all,

When I do a mail merge with VB, I am trying to update a certain value
on my word document...
It is using an IF field... But on the new merged document it just
appears blank with no value

{ IF{MERGEFIELD PowerConnected } = 1 "Note: Power was connected at time
of inspection." "Note: Power was not connected at time of
inspection." }

In the data I am passing PowerConnected does equal 1 ... is there
anything you could suggest....
thanks

Nathan









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
Merging data with INSERTTEXT and MERGEFIELDs James Mailmerge 7 February 9th 06 02:14 PM
Replace mergefields with form fields jassi_Hayre Mailmerge 1 August 16th 05 10:49 PM
remove mergefields, keep values Jim Zoupas Mailmerge 2 March 15th 05 09:25 AM
Mergefields change Format Graham Mailmerge 2 March 1st 05 01:59 PM
Working with Mergefields Duncan McDonald New Users 1 November 25th 04 02:25 PM


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