Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
n.almeida
 
Posts: n/a
Default The use of fields for the correct use "a" or "an"

I have this Bookmark and its result some time is "Language Diploma" some time
is "Art History Degree".
I would like to insert this field { REF EducDiploma1 } in a text but a
grammar problem arises "a Language Diploma" or "an Art History Degree".
How can I insert another field that recognises the first letter of the next
field.
OR
How can I insert the condition in the field itself but without repating the
{ REF EducDiploma1 } many times (because it happens often in the text with
other bookmarks)
I hope it is clear
Thanks
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor
 
Posts: n/a
Default The use of fields for the correct use "a" or "an"

This is a bit complicated but can be achieved -

{ IF{ =({ IF{ Mergefield EducDiploma1 \*Upper } = "A*" 1 0 } + { IF{
Mergefield EducDiploma1 \*Upper } = "E*" 1 0 } + { IF{ Mergefield
EducDiploma1 \*Upper } = "I*" 1 0 } + { IF{ Mergefield EducDiploma1
\*Upper } = "O*" 1 0 } + { IF{ Mergefield EducDiploma1 \*Upper } = "U*" 1
0 } + { IF{ Mergefield EducDiploma1 \*Upper } = "H*" 1 0 })} = 1 "an"
"a" } { MERGEFIELD EducDiploma1 }

You can check the first letter of the field by using a wildcard (eg) = H*
having added an upper case switch to the field you are checking (in case the
fields are not all upper case).


--

Graham Mayor - Word MVP

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



n.almeida wrote:
I have this Bookmark and its result some time is "Language Diploma"
some time is "Art History Degree".
I would like to insert this field { REF EducDiploma1 } in a text but a
grammar problem arises "a Language Diploma" or "an Art History
Degree".
How can I insert another field that recognises the first letter of
the next field.
OR
How can I insert the condition in the field itself but without
repating the { REF EducDiploma1 } many times (because it happens
often in the text with other bookmarks)
I hope it is clear
Thanks



  #3   Report Post  
Posted to microsoft.public.word.docmanagement
n.almeida
 
Posts: n/a
Default The use of fields for the correct use "a" or "an"

Thanks Graham,
I had got that far (in a different way but I have not the code with me right
now) but my question was concentrating on not repeating the EducDiploma1 that
many times to be able to use it with different Bookmarks.
In the meantime I found out that toggling field codes, selecting the field
codes and using "find and replace" to replace the bookmark name works quite
well, and I would say fast enough.
But thanks, again.

"Graham Mayor" wrote:

This is a bit complicated but can be achieved -

{ IF{ =({ IF{ Mergefield EducDiploma1 \*Upper } = "A*" 1 0 } + { IF{
Mergefield EducDiploma1 \*Upper } = "E*" 1 0 } + { IF{ Mergefield
EducDiploma1 \*Upper } = "I*" 1 0 } + { IF{ Mergefield EducDiploma1
\*Upper } = "O*" 1 0 } + { IF{ Mergefield EducDiploma1 \*Upper } = "U*" 1
0 } + { IF{ Mergefield EducDiploma1 \*Upper } = "H*" 1 0 })} = 1 "an"
"a" } { MERGEFIELD EducDiploma1 }

You can check the first letter of the field by using a wildcard (eg) = H*
having added an upper case switch to the field you are checking (in case the
fields are not all upper case).


--

Graham Mayor - Word MVP

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



n.almeida wrote:
I have this Bookmark and its result some time is "Language Diploma"
some time is "Art History Degree".
I would like to insert this field { REF EducDiploma1 } in a text but a
grammar problem arises "a Language Diploma" or "an Art History
Degree".
How can I insert another field that recognises the first letter of
the next field.
OR
How can I insert the condition in the field itself but without
repating the { REF EducDiploma1 } many times (because it happens
often in the text with other bookmarks)
I hope it is clear
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
Multiple document index uses docs showing fields Jeff Gilbertson Formatting Long Documents 7 January 9th 06 07:00 AM
New fields do not show in a merged letter when using Address Block angelaoak24 Mailmerge 5 December 15th 05 05:34 PM
Mailmerge vs. form fields Candace Mailmerge 1 September 8th 05 07:14 PM
Word crashing upon re-use of a template jenwren Microsoft Word Help 5 August 24th 05 11:59 PM
Populate Merge Fields via VB.NET ben Mailmerge 5 June 21st 05 05:43 PM


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