Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 03-16-2025, 07:34 PM
macropod's Avatar
macropod macropod is offline Search for and replace merge fields in Word doc with plain text using VBA Windows 10 Search for and replace merge fields in Word doc with plain text using VBA Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,525
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

Surely the simplest way would be to connect the documents to a data source containing all the required fields and, for each field, a record with whatever ouput text you want, then merge to a new document.

Still, if you're wedded to a VBA approach, you might find the macro titled Create Text Representations of Working Fields in the Mailmerge Tips & Tricks 'Sticky' thread at the top of the Mailmerge forum helpful. That code converts field codes to text representations of their content. See: https://www.msofficeforums.com/mail-...ps-tricks.html

PS: For mailmerges, you should be using mailmerge main documents, not templates.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 

Tags
mailmerge, ms-word, vba



Similar Threads
Thread Thread Starter Forum Replies Last Post
Search for and replace merge fields in Word doc with plain text using VBA Plain text help with returns - looking for marker to use when converting to plain text redzan Word 1 04-18-2017 06:17 PM
Macro to keep formatted form fields after mail merge or replace text with formatted form fields jer85 Word VBA 2 04-05-2015 10:00 PM
Searhc for Hyperlinked Word and replace with plain text or nothing somniloquist Word 3 10-04-2011 02:33 AM
Search for and replace merge fields in Word doc with plain text using VBA Replace all occurrences of one merge field with plain text blankenthorst Mail Merge 5 07-01-2011 05:18 AM
Replace All with plain text containing subscript DeaducK Word 0 06-24-2010 08:16 PM

Other Forums: Access Forums

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


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