Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-06-2020, 06:58 AM
Alex1s85 Alex1s85 is offline Content Control Fields - IF Statements Windows 10 Content Control Fields - IF Statements Office 2016
Advanced Beginner
Content Control Fields - IF Statements
 
Join Date: Oct 2019
Location: Thessaloniki, Greece
Posts: 30
Alex1s85 is on a distinguished road
Default Content Control Fields - IF Statements

Hello to everyone,




I have a merge document with multiple Content Control Fields. Fields are populated from SQL database.



Is there any way to insert if statements in the Content Control Fields?


Additionally, I would like to change the date format from yyyy/mm/dd to dd/MM/yyyy.


Any help would be greatly appreciated.
Reply With Quote
  #2  
Old 08-06-2020, 06:14 PM
macropod's Avatar
macropod macropod is offline Content Control Fields - IF Statements Windows 7 64bit Content Control Fields - IF Statements Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
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

Content Controls are not fields. Please clarify.

You should also read the numerous articles in the Mailmerge Tips and Tricks 'Sticky' thread at the top of this forum: https://www.msofficeforums.com/mail-...ps-tricks.html
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 08-06-2020, 10:32 PM
Alex1s85 Alex1s85 is offline Content Control Fields - IF Statements Windows 10 Content Control Fields - IF Statements Office 2016
Advanced Beginner
Content Control Fields - IF Statements
 
Join Date: Oct 2019
Location: Thessaloniki, Greece
Posts: 30
Alex1s85 is on a distinguished road
Default

It is Rich Text Content Control.

I didn't find something relevant for Rich Text Content Controls in Mailmerge Tips & Tricks.


Is it possible to insert if statements and to edit the format of values such as currency and date?


Docs are populated from SQL database.




Reply With Quote
  #4  
Old 08-07-2020, 12:59 AM
gmayor's Avatar
gmayor gmayor is offline Content Control Fields - IF Statements Windows 10 Content Control Fields - IF Statements Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,101
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

You can change the type of control from rich text to date and set the date format as required, but you will lose the existing value if you change the type.


You would need a macro to resolve the value of the control.
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #5  
Old 08-08-2020, 10:31 PM
macropod's Avatar
macropod macropod is offline Content Control Fields - IF Statements Windows 7 64bit Content Control Fields - IF Statements Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
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

So why are you using a Content Control for a mailmerge instead of using a mergefield?
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #6  
Old 08-09-2020, 03:48 AM
Alex1s85 Alex1s85 is offline Content Control Fields - IF Statements Windows 10 Content Control Fields - IF Statements Office 2016
Advanced Beginner
Content Control Fields - IF Statements
 
Join Date: Oct 2019
Location: Thessaloniki, Greece
Posts: 30
Alex1s85 is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
So why are you using a Content Control for a mailmerge instead of using a mergefield?

The docs have already been in live production on a CRM core system.

We are trying to fine tune them in order to minimize user's modifications upon their release.


I was just wondering if there is a way to insert if statements or to create nested Content controls.
Reply With Quote
  #7  
Old 08-09-2020, 04:14 AM
macropod's Avatar
macropod macropod is offline Content Control Fields - IF Statements Windows 7 64bit Content Control Fields - IF Statements Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
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

It is not possible to embed a Content Control in a Field of any kind and have the Content Control survive the merge. Mergefields can be embedded in Content Controls, however, such that a Content Control will display the embedded Mergefield's result upon execution.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #8  
Old 08-09-2020, 04:32 AM
Alex1s85 Alex1s85 is offline Content Control Fields - IF Statements Windows 10 Content Control Fields - IF Statements Office 2016
Advanced Beginner
Content Control Fields - IF Statements
 
Join Date: Oct 2019
Location: Thessaloniki, Greece
Posts: 30
Alex1s85 is on a distinguished road
Default

Ι see.


So, if i insert in the Content Control a statement such as:
{ if { [Alex1s85] }<> "" "Date: { [Alex1s85] \@"dd-MM-yyyy" }"
it will work?
Reply With Quote
  #9  
Old 08-09-2020, 04:37 AM
macropod's Avatar
macropod macropod is offline Content Control Fields - IF Statements Windows 7 64bit Content Control Fields - IF Statements Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
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

What is [Alex1s85]?
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #10  
Old 08-09-2020, 04:42 AM
Alex1s85 Alex1s85 is offline Content Control Fields - IF Statements Windows 10 Content Control Fields - IF Statements Office 2016
Advanced Beginner
Content Control Fields - IF Statements
 
Join Date: Oct 2019
Location: Thessaloniki, Greece
Posts: 30
Alex1s85 is on a distinguished road
Default

[Alex1s85] is the the content control's bookmark.
Reply With Quote
  #11  
Old 08-11-2020, 04:55 PM
macropod's Avatar
macropod macropod is offline Content Control Fields - IF Statements Windows 7 64bit Content Control Fields - IF Statements Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
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

So what does this have to do with a mailmerge?
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #12  
Old 08-11-2020, 09:34 PM
Alex1s85 Alex1s85 is offline Content Control Fields - IF Statements Windows 10 Content Control Fields - IF Statements Office 2016
Advanced Beginner
Content Control Fields - IF Statements
 
Join Date: Oct 2019
Location: Thessaloniki, Greece
Posts: 30
Alex1s85 is on a distinguished road
Default

Please move the thread or delete it.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Importing content control data from excel and populate two fields on selected dropdown badarlodhi Word VBA 8 02-08-2023 10:47 AM
Content Control Fields - IF Statements Content Control Dropdowns - How to duplicate the content control and allow a second choice ashleyf Word VBA 2 03-19-2020 09:11 AM
How can I set up tab to go back and forth between legacy fields and content control fields in a Word Ikajed Word 1 10-13-2017 06:06 PM
making an email form in outlook that has restricted access and uses content control fields ericc2728 Outlook 0 08-25-2014 11:19 AM
Content Control Fields - IF Statements Deleting a table from a content control -- preserving the content control BrainSlugs83 Word Tables 8 11-14-2013 03:06 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 05:16 AM.


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