Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-08-2014, 01:49 PM
oakye oakye is offline Max length of TrueText in IF Statement? Mac OS X Max length of TrueText in IF Statement? Office for Mac 2011
Novice
Max length of TrueText in IF Statement?
 
Join Date: Apr 2014
Posts: 3
oakye is on a distinguished road
Default 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?
Reply With Quote
  #2  
Old 04-08-2014, 03:00 PM
macropod's Avatar
macropod macropod is offline Max length of TrueText in IF Statement? Windows 7 32bit Max length of TrueText in IF Statement? Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
  #3  
Old 04-09-2014, 05:17 PM
oakye oakye is offline Max length of TrueText in IF Statement? Mac OS X Max length of TrueText in IF Statement? Office for Mac 2011
Novice
Max length of TrueText in IF Statement?
 
Join Date: Apr 2014
Posts: 3
oakye is on a distinguished road
Default

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" }."}
Reply With Quote
  #4  
Old 04-09-2014, 05:52 PM
macropod's Avatar
macropod macropod is offline Max length of TrueText in IF Statement? Windows 7 32bit Max length of TrueText in IF Statement? Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by oakye View Post
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.
Actually, that's exactly what I did - they're pairs of single quotes, not double quotes. There are ways of using double quotes (e.g. inside a QUOTE field and prefixed by a \ character), but that's no less complicated than using paired single quotes.
Quote:
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.
Yes, but it won't come out as an active hyperlink - just plain text.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #5  
Old 04-10-2014, 02:48 PM
oakye oakye is offline Max length of TrueText in IF Statement? Mac OS X Max length of TrueText in IF Statement? Office for Mac 2011
Novice
Max length of TrueText in IF Statement?
 
Join Date: Apr 2014
Posts: 3
oakye is on a distinguished road
Default

Thanks for the quick confirmation!!
Reply With Quote
Reply

Thread Tools
Display Modes


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
Max length of TrueText in IF Statement? 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

Other Forums: Access Forums

All times are GMT -7. The time now is 08:51 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft