docvariable + insert line

D

Diane

Group,
In my efforts to try and figure out how to insert a paragraph break with a
document variable, I found the following "partial" solution. The user
indicates it works perfect, but the answer is missing.....so can anyone
interpret this for me:


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

When I do the above, hitting the enter key I get the following problem:

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.

Any hint of what I'm doing wrong, would be great!!
Diane
 
M

macropod

Hi Diane,

The field coding won't work as it is, but the following should do the job:
{IF{DOCVARIABLE OPT10a}="Error!*" "" "¶{DOCVARIABLE OPT10a}"}
Simply replace the pilcrow (ie ¶) with a paragraph mark or line-feed character.

Note: This isn't vba - it's field coding. Also, the field brace pairs (ie '{ }') for the above example are created via Ctrl-F9 - you
can't simply type them or copy & paste them from this message.
 
D

Diane

macropod,
I have it working, I think I was doing the copy/paste instead of hitting the
enter key. This is working exactly as needed.
Thanks for the post!
Diane

macropod said:
Hi Diane,

The field coding won't work as it is, but the following should do the job:
{IF{DOCVARIABLE OPT10a}="Error!*" "" "¶{DOCVARIABLE OPT10a}"}
Simply replace the pilcrow (ie ¶) with a paragraph mark or line-feed character.

Note: This isn't vba - it's field coding. Also, the field brace pairs (ie '{ }') for the above example are created via Ctrl-F9 - you
can't simply type them or copy & paste them from this message.

--
Cheers
macropod
[MVP - Microsoft Word]


Diane said:
Group,
In my efforts to try and figure out how to insert a paragraph break with a
document variable, I found the following "partial" solution. The user
indicates it works perfect, but the answer is missing.....so can anyone
interpret this for me:


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

When I do the above, hitting the enter key I get the following problem:

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.

Any hint of what I'm doing wrong, would be great!!
Diane
 

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