#1
|
|||
|
|||
Max length of TrueText in IF Statement?
I am creating an IF statement in Office for Mac 2011. The only merging that is happening is within the IF statement, but that's not my issue. I am trying to update the field code to test if the "Truetext" can be several lines line and/or contain a paragraph break.
Example: {IF { MERGEFIELD Salesforce.Custom_Field__c \* MERGEFORMAT } <> "" "add a ton of Terms & Condition text right here and see if I can include a paragraph break." \* MERGEFORMAT } Here are my challenges: - When trying to use the Insert > Field... > IF option within Word, I can't cut and paste the long text into the field the wizard gives me. - In the .DOC, with field codes exposed, if I try to paste in the long text into the IF field, and then highlight the whole gray-shaded field, and do a right-mouse-button click "Update Field", and then save the document, the updates are not updated. What else am I missing? |
#2
|
||||
|
||||
The TRUE/FALSE statements could be as long as, say, 'War & Peace', including tables, pictures and so on. The only proviso is that double quotes can't be included in either expression (you could use pairs of single quotes instead).
When you want to insert large amounts of formatted context, it's best to ignore the dialogues and create the fields manually. You do this via Ctrl-F9 on a PC or Cmd-F9 on a Mac. What you don't need (or probably want) is the '\* MERGEFORMAT' switches. Thus, your field code could become: {IF { MERGEFIELD Salesforce.Custom_Field__c } = "" "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas porttitor congue massa. Fusce posuere, magna sed pulvinar ultricie’s, purus lectus malesuada libero, sit amet commodo magna eros quis urna.¶ Nunc viverra imperdiet enim. Fusce est. ‘‘Vivamus a tellus’’.¶ Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin pharetra nonummy pede. Mauris et orci."} or: {IF «Salesforce.Custom_Field__c» = "" "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas porttitor congue massa. Fusce posuere, magna sed pulvinar ultricie’s, purus lectus malesuada libero, sit amet commodo magna eros quis urna.¶ Nunc viverra imperdiet enim. Fusce est. ‘‘Vivamus a tellus’’.¶ Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin pharetra nonummy pede. Mauris et orci."} where the ¶ is a real real line/paragraph break. In the second example, «Salesforce.Custom_Field__c» represents the mergefield that you can still insert via the dialogues. Note that there's no need for an empty FALSE statement.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
Very helpful - thanks for confirming, macropod!
I have been able to test this successfully. I realized that if I copy & paste text from elsewhere in my .DOC, into the field code, it doesn't always show up. (This happens even if I choose to update fields, and save the file.) I am successful when I manually type in the text of War & Peace haha. Other: - I used 2 single quotes together, vs a double quote, in the TRUE/FALSE statements. Somewhere on the interwebs I read that this makes sure that Word understands the text in between the quote marks. I see you didn't do that...so I will attempt that myself, too. New Twist: -Within the TRUE/FALSE text, can I also add a hyperlink? I don't even need it to mask the URL. I have not been able to save a copy of the merged file in PDF format. Example: In the TRUE text of an IF statement: {IF { MERGEFIELD Salesforce.Custom_Field__c } = "" "Lorem commodo magna eros quis urna.¶ Nunc viverra insert imperdiet enim. Fusce est. ‘‘Vivamus a tellus’’.¶ Pellentesque then click this link here { HYPERLINK "http://www.cnn.com" }."} |
#4
|
||||
|
||||
Quote:
Quote:
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#5
|
|||
|
|||
Thanks for the quick confirmation!!
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Movie Length | helmerg | PowerPoint | 0 | 07-29-2013 12:23 PM |
Critical Path Length | ketanco | Project | 5 | 03-15-2013 01:12 PM |
Searching by Quotation Length | cheech1981 | Word | 4 | 03-14-2013 08:23 AM |
page length | mzimpfer | Word | 2 | 10-23-2010 11:53 AM |
How to set the same length for different lines | myword29 | Word | 0 | 09-28-2007 08:12 PM |