Carriage return within document field?

D

Dylan

How do I add a carriage return to my document field so that:

{IF {DOCVARIABLE OPT10a \* MERGEFORMAT}="Error! No document variable
supplied." "" {DOCVARIABLE OPT10a \* MERGEFORMAT}}

If the variable Opt10a doesn't equal "error!..." the value of Opt 10a is
displayed along with a carriage return. So that the next field Opt10b starts
on a new line?

I've tried the following in the field code and in the macro.
chr(13)
&vbCr
and I've tried these in the field code only
\r
\r\n

Kind Regards
DDawson
 
S

Stefan Blom

In the field code, just press Enter at the appropriate location. (You may
want to show nonprinting marks in order to see more easily what you are
doing.)

--
Stefan Blom
Microsoft Word MVP


in message
news:[email protected]...
 
D

Dylan

Stefan

It don't work; it adds a paragraph between the last two }} marks and moves
the last } onto the next line. However, when I update the field it remains
the same. When I view paragraph marks the fields are shaded in grey, but the
paragraph mark remains white between the last two }} marks.
 
S

Stefan Blom

Don't forget the quotation marks. Something like this:

{IF {DOCVARIABLE OPT10a \* MERGEFORMAT}="Error! No document variable
supplied." "" "{ ¶ <----- Press Enter here
DOCVARIABLE OPT10a \* MERGEFORMAT }" }

--
Stefan Blom
Microsoft Word MVP


in message
 
S

Stefan Blom

Or:

{IF {DOCVARIABLE OPT10a \* MERGEFORMAT}="Error! No document variable
supplied." "" "{ DOCVARIABLE OPT10a \* MERGEFORMAT }¶
" }

if you want the paragraph mark after the inserted DOCVARIABLE field.

--
Stefan Blom
Microsoft Word MVP


in message
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top