Group:  Microsoft Word ยป microsoft.public.word.mailmerge.fields
Thread: inserting quotation marks with IF

Geek News

inserting quotation marks with IF
hbear 6/28/2007 2:56:04 PM
I'm creating a bibliography through a merge and would like to insert
quotation marks around one field if another field contains text. The
criteria is simple: if "Details" is not blank, insert """ (that's a single
quotation mark) in front of "Summary", with a similar statement at the end of
"Summary". I've tried both the IF, Then, Else... box and manually inserting
the statement myself. Neither is working. I'm not getting quotation marks
under any circumstances. I'm guessing it's some confusion surrounding having
three quotation marks in a row ("""). What's the workaround for this?
Adding spaces doesn't help (of course).
Re: inserting quotation marks with IF
"Peter Jamieson" <pjj[ at ]KillmapSpjjnet.demon.co.uk> 6/28/2007 4:50:50 PM
Use either

{ IF "{ MERGEFIELD Details }" <> "" "{ QUOTE 34 }Summary{ QUOTE 34 }" }

or if you need a lot of them it might be clearer to use something like

{ SET q { QUOTE 34 } }

at the beginning of the document then use { q } where you need the qutoe
mark, e.g.

{ IF "{ MERGEFIELD Details }" <> "" "{ q }Summary{ q }" }

(All the {} have to be the special field braces that you can insert using
ctrl-F9 - you cna't just type them on the keyboard.)

Peter Jamieson
"hbear" <hbear[ at ]discussions.microsoft.com> wrote in message
news:0936C7FB-D1AB-4B16-A171-EDE155E55D4C[ at ]microsoft.com...
[Quoted Text]
> I'm creating a bibliography through a merge and would like to insert
> quotation marks around one field if another field contains text. The
> criteria is simple: if "Details" is not blank, insert """ (that's a single
> quotation mark) in front of "Summary", with a similar statement at the end
> of
> "Summary". I've tried both the IF, Then, Else... box and manually
> inserting
> the statement myself. Neither is working. I'm not getting quotation
> marks
> under any circumstances. I'm guessing it's some confusion surrounding
> having
> three quotation marks in a row ("""). What's the workaround for this?
> Adding spaces doesn't help (of course).

Re: inserting quotation marks with IF
hbear 6/28/2007 5:24:02 PM
Thank you! Fabulous information!


"Peter Jamieson" wrote:

[Quoted Text]
> Use either
>
> { IF "{ MERGEFIELD Details }" <> "" "{ QUOTE 34 }Summary{ QUOTE 34 }" }
>
> or if you need a lot of them it might be clearer to use something like
>
> { SET q { QUOTE 34 } }
>
> at the beginning of the document then use { q } where you need the qutoe
> mark, e.g.
>
> { IF "{ MERGEFIELD Details }" <> "" "{ q }Summary{ q }" }
>
> (All the {} have to be the special field braces that you can insert using
> ctrl-F9 - you cna't just type them on the keyboard.)
>
> Peter Jamieson
> "hbear" <hbear[ at ]discussions.microsoft.com> wrote in message
> news:0936C7FB-D1AB-4B16-A171-EDE155E55D4C[ at ]microsoft.com...
> > I'm creating a bibliography through a merge and would like to insert
> > quotation marks around one field if another field contains text. The
> > criteria is simple: if "Details" is not blank, insert """ (that's a single
> > quotation mark) in front of "Summary", with a similar statement at the end
> > of
> > "Summary". I've tried both the IF, Then, Else... box and manually
> > inserting
> > the statement myself. Neither is working. I'm not getting quotation
> > marks
> > under any circumstances. I'm guessing it's some confusion surrounding
> > having
> > three quotation marks in a row ("""). What's the workaround for this?
> > Adding spaces doesn't help (of course).
>
>

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net