Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to type a paragraph mark within conditional text 1

Status
Not open for further replies.

cramd2

Programmer
Jun 10, 2005
51
US
I was having an issue with forcing WORD 2003 to print a blank line when a field was empty, although I came across a solution within this forum. My problem is I don't understand how to type a paragraph mark in my code:
************
this is what I want:
This example will force a blank line even if the field is empty:

{ IF { MERGEFIELD Address2 }= "" "<paragraph mark here>
" "<paragraph mark here>
{ MERGEFIELD Address2 }" }

**************
this is what I typed:
{IF{MERGEIELD LN1} = "" "<¶>" "<¶> {MERGEFIELD LN1} "}

this is my results:
<¶>
Jane Doe
Street
City, State zip

It prints the paragraph mark as text on the blank line.

cramd2


 
Hi cramd2,

It's awfully difficult to explain (or understand) these things. You should be able to press Enter, same way you would outside a Field. Is that what you did - or did you enter the pilcrow character?

Enjoy,
Tony

--------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.
Excel VBA Training and more Help at VBAExpress[
 
Tony,
On the second try.....
I typed the "lesser" symbol ("<") - which I don't know if that is correct, then within MSWORD,--> INSERT, -->SYMBOL, -->Special Character, chose the paragraph symbol, then I typed the "greater" symbol (">"). Repeated the same process for the
second paragraph marker. And...sorry, but is the "pilcrow character" the paragraph marker?

On the first try....
I attempted to hit the enter key to get the paragraph marker, but could not get control on the right side of this marker to insert the closing quote; that's when I took the steps above to finally get the paragraph marker inserted.

AND....
You are right, this is very difficult to explain what I'm doing to get these symbols.....

BUT....
THANKS for trying to understand me!!!

cramd2
 
Hi cramd2,

I think I've just realised part of what you're trying to do. Are you trying to wrap the paragraph mark (yes, the backward P symbol is called a pilcrow) in 'angle brackets' (less than and greater than symbols) to make them like a mergefield?

I think you're making life much harder than you need. There is a mail merge option to 'print blank lines when fields are empty' (or something similar) so that you shouldn't need to do anything explicit yourself at all.



Enjoy,
Tony

--------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.
Excel VBA Training and more Help at VBAExpress[
 
Tony,
Your statement:
"There is a mail merge option to 'print blank lines when fields are empty' (or something similar) so that you shouldn't need to do anything explicit yourself at all."

Seems to be true IF you are using MSWORD 2000, mail merge has the option to turn off & on the 'print blank line' feature. Although with MSWORD 2003, Microsoft -(so I've PAINFULLY learned) has fixed a feature that I wish they hadn't by giving us a Mail Merge Wizard that does not allow one to turn off & on the "print blank line" feature, but rather, suppresses the blank lines by default. Now, I also have learned that if you add the Mail Merge Helper to your toolbar, (which is unknown to many users as myself) then you get the same mail merge options as one did in MSWORD 2000 - thus allowing me to turn off & on the 'print blank line' feature. Now, I don't want to deal with the version of MSWORD when someone is merging, I would like to set this code in the mail merge field so that no one has to spend hours trying to figure out why name & addresses adjust up & down on one pc and doesn't on another, (i.e., one pc has MSWORD 2000 that prints blank lines, the other pc has MSWORD 2003 and by default suppresses the blank lines).
I bet your now sorry you asked......
cramd2
 
Hi cramd2,

OK, I'm with you - you can sort it by putting the old Mail Merge Helper on the menu - I have the old MailMerge button on my Mail Merge Toolbar for the same effect.

I haven't time to play any more at the moment (will revisit in a couple of hours) - but it seems as though, you can in effect override the default simply by putting

[blue][tt] { IF { MERGEFIELD Address2 }= "" "" { MERGEFIELD Address2 } }[/tt][/blue]

with a return after the closing brace. Let me know.

Enjoy,
Tony

--------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.
Excel VBA Training and more Help at VBAExpress[
 
Tony,
PERFECT!!
That is exactly what I needed!!
Many Thanks!! STARS for TONY!
cramd2

 
Hi cramd2,

I've had a bit more of a play with this as I wasn't awfully happy with the logic of what I posted yesterday - 'If A is blank, output blank else output A' just feels wrong.

The suppress blank lines thing is a peculiar mail merge feature which does not apply to anything else so the simple thing is just to wrap it in a (non-mailmerge) field without any special logic and this seems to do the trick ..

[blue][tt] { QUOTE { MERGEFIELD Address2 } }[/tt][/blue]

(still with a Return after the closing brace) - and I'm much happier with this [smile]

Enjoy,
Tony

--------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.
Excel VBA Training and more Help at VBAExpress[
 
Tony,
I've changed my code as you have shown "{ QUOTE { MERGEFIELD Address2 } }" and all works. I like the logic that you have shown, wrapping the mergefield in a non-merge field to keep my line spacing. Many Thanks for your help!

Now - on a side note, within this forum, I've lost my original profile. Every time I try to sign on, I get a Tek-Tips Registeration Problem. I finally created a new profile so that I can post questions again, but I would really like to become my old self again so that I can have access to all of my previous posts. I've contacted Tek-Tips about this issue but I have not received any contact from them on this. I'm just looking for advice as to where I can address this issue?
cramd2
 
Hi cramd2,

If you have contacted Tek-Tips management they should get round to looking at your problem - but they are busy people. When you logon with your new profile, can you then look at your old profile? What was your old id?

Enjoy,
Tony

--------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.
Excel VBA Training and more Help at VBAExpress[
 
Tony,
I did a search based on my old handle, "cramd" and was able to bring up all my posts. As long as my history is still available, I'm o.k. with the new me, but I will contact the management again on this.
Thanks,
cramd2
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top