Can the user execute a conditional cursor movement (or other action) from within a Word 2010 merge IF statement? In otherwords, are there codes for executing Word 2010 actions (such as a tab, line break, or new page) from within a merge?
April 9, 2024
Contribute to the Microsoft 365 and Office forum!
Click here to learn more 💡
May 10, 2024
Word Forum Top Contributors:
Executing a TAB (next cell) command from within a merge
Report abuse
Thank you.
Reported content has been submitted
For the first question, at the point in the If...then...Else field construction where you want the feature to be used, you simply press the relevant key on the keyboard.
As an example:
{ IF { MERGEFIELD Address2 } <> "" "{ MERGEFIELD Address2 }¶
{ MERGEFIELD City }" "{ MERGEFIELD City }" }
In the above you would press the Enter key where the ¶ appears and, if the Address2 field is not empty, the data from that field will be inserted followed by a paragraph return and the data from the City field will appear on the next line. If however the Address2 field is blank, then the data from City field will appear on the line following the previous field.
For the second question, the answer is No, but it is possible to use Visual Basic to create a "roll-your-own" equivalent to mail merge and in that way, you can do just about anything.
Examples of this are contained in my
MergeTools – 20130627 Add-in that you can download from the following page of my Windows Live SkyDrive:
https://skydrive.live.com/?cid=5aedcb43615e886b#!/?cid=5AEDCB43615E886B!cid=5AEDCB43615E886B&id=5AEDCB43615E886B%21566
It contains facilities to perform the following types of "merge:
Many to One
Merge with Charts
Duplex Merge
Merge with FormFields
Merge with Attachments
Merge to Individual Documents
Merge, Print and Staple
none of which can be performed by Mail Merge out-of-the-box.
Doug Robbins - MVP Office Apps & Services (Word)
dougrobbinsmvp@gmail.com
It's time to replace ‘Diversity, Equity & Inclusion’ with ‘Excellence, Opportunity & Civility’ - V Ramaswamy
Report abuse
Thank you.
Reported content has been submitted
Was this reply helpful?
Sorry this didn't help.
Great! Thanks for your feedback.
How satisfied are you with this reply?
Thanks for your feedback, it helps us improve the site.
How satisfied are you with this reply?
Thanks for your feedback.
While you can include a tab, line break, Enter, or New page as one or the other of the results of an If...then...Else, field construction, if that field construction is located in the cell of the table, the effect of the action will be contained within that cell. Specifically in the case of a TAB, it will NOT result in the next cell action, but will be treated as if Ctrl+tab was used within a cell.
Doug Robbins - MVP Office Apps & Services (Word)
dougrobbinsmvp@gmail.com
It's time to replace ‘Diversity, Equity & Inclusion’ with ‘Excellence, Opportunity & Civility’ - V Ramaswamy
Report abuse
Thank you.
Reported content has been submitted
Was this reply helpful?
Sorry this didn't help.
Great! Thanks for your feedback.
How satisfied are you with this reply?
Thanks for your feedback, it helps us improve the site.
How satisfied are you with this reply?
Thanks for your feedback.
Question Info
Last updated October 5, 2021 Views 172 Applies to: