Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Brenda A. Reid[_2_] Brenda A. Reid[_2_] is offline
external usenet poster
 
Posts: 1
Default Referencing a User Form using an If statement field code

Word 2007
I am using a vba user form to fill in vendor and purchaser names. There
could be one vendor or two vendors. All through the template there are
spots where you have to refer to either Vendor or Vendors. Rather than
using vba coding and bookmarks, I'd like to use something like the following
in the template but it is not working. Is there a way to reference a user
form field?

My example: Vendor{if PrecForm1.Vendor2.text "" "s" ""}

So what I'm trying to say is if the vendor2 field is filled in on the form,
then use Vendors instead of Vendor.

Brenda


  #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 Referencing a User Form using an If statement field code

The way I would do this would be to have the term Vendor or Vendors appear
as a result of the value assigned to a document variable and use a {
DOCVARIABLE } in the document where ever the term is to appear.

--
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
"Brenda A. Reid" wrote in message
...
Word 2007
I am using a vba user form to fill in vendor and purchaser names. There
could be one vendor or two vendors. All through the template there are
spots where you have to refer to either Vendor or Vendors. Rather than
using vba coding and bookmarks, I'd like to use something like the
following in the template but it is not working. Is there a way to
reference a user form field?

My example: Vendor{if PrecForm1.Vendor2.text "" "s" ""}

So what I'm trying to say is if the vendor2 field is filled in on the
form, then use Vendors instead of Vendor.

Brenda


  #3   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 Referencing a User Form using an If statement field code

Please do not post the same question separately to multiple newsgroups.

--
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
"Brenda A. Reid" wrote in message
...
Word 2007
I am using a vba user form to fill in vendor and purchaser names. There
could be one vendor or two vendors. All through the template there are
spots where you have to refer to either Vendor or Vendors. Rather than
using vba coding and bookmarks, I'd like to use something like the
following in the template but it is not working. Is there a way to
reference a user form field?

My example: Vendor{if PrecForm1.Vendor2.text "" "s" ""}

So what I'm trying to say is if the vendor2 field is filled in on the
form, then use Vendors instead of Vendor.

Brenda


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
Table field code referencing table cell with text Helge V. Larsen Tables 1 July 16th 09 09:32 AM
How do you add an IF statement to a user form field? Larry Root Microsoft Word Help 3 July 2nd 09 01:58 PM
Form field in conditional statement [email protected] Microsoft Word Help 4 April 28th 09 06:17 AM
Field Code: User entered data updates in header/footer Dave Microsoft Word Help 7 March 6th 06 06:01 PM
User-defined table format using Database field code Papy2000 Mailmerge 1 December 19th 04 10:38 AM


All times are GMT +1. The time now is 06:51 PM.

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"