![]() |
#4
|
||||
|
||||
![]()
Update:
If you add the following macro to your mailmerge main document, clicking on the 'Edit Individual Documents' button will intercept the merge and convert any email and hyperlink strings in the output document to working hyperlinks. Code:
Sub MailMergeToDoc() Application.ScreenUpdating = False Dim bHead As Boolean, bList As Boolean, bBullet As Boolean, _ bOther As Boolean, bQuote As Boolean, bSymbol As Boolean, _ bOrdinal As Boolean, bFraction As Boolean, bEmphasis As Boolean, _ bHLink As Boolean, bStyle As Boolean, bMail As Boolean, bTag As Boolean 'Store the current autoformat options With Options bHead = .AutoFormatApplyHeadings bList = .AutoFormatApplyLists bBullet = .AutoFormatApplyBulletedLists bOther = .AutoFormatApplyOtherParas bQuote = .AutoFormatReplaceQuotes bSymbol = .AutoFormatReplaceSymbols bOrdinal = .AutoFormatReplaceOrdinals bFraction = .AutoFormatReplaceFractions bEmphasis = .AutoFormatReplacePlainTextEmphasis bHLink = .AutoFormatReplaceHyperlinks bStyle = .AutoFormatPreserveStyles bMail = .AutoFormatPlainTextWordMail bTag = .LabelSmartTags End With 'Restrict autoformating to emails and hyperlinks With Options .AutoFormatApplyHeadings = False .AutoFormatApplyLists = False .AutoFormatApplyBulletedLists = False .AutoFormatApplyOtherParas = False .AutoFormatReplaceQuotes = False .AutoFormatReplaceSymbols = False .AutoFormatReplaceOrdinals = False .AutoFormatReplaceFractions = False .AutoFormatReplacePlainTextEmphasis = False .AutoFormatReplaceHyperlinks = True .AutoFormatPreserveStyles = False .AutoFormatPlainTextWordMail = True .LabelSmartTags = False End With 'Execute the Mailmerge ActiveDocument.MailMerge.Execute 'Apply the autoformating to the output document ActiveDocument.Range.AutoFormat 'Restore the original autoformat options With Options .AutoFormatApplyHeadings = bHead .AutoFormatApplyLists = bList .AutoFormatApplyBulletedLists = bBullet .AutoFormatApplyOtherParas = bOther .AutoFormatReplaceQuotes = bQuote .AutoFormatReplaceSymbols = bSymbol .AutoFormatReplaceOrdinals = bOrdinal .AutoFormatReplaceFractions = bFraction .AutoFormatReplacePlainTextEmphasis = bEmphasis .AutoFormatReplaceHyperlinks = bHLink .AutoFormatPreserveStyles = bStyle .AutoFormatPlainTextWordMail = bMail .LabelSmartTags = bTag End With Application.ScreenUpdating = True End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Export Embedded Docs inside Word | dhen21dx | Word | 2 | 03-25-2019 01:58 AM |
Converting a Select statement in Excel to an update statement | shabbaranks | Excel Programming | 5 | 10-31-2018 11:47 PM |
Text inside text boxes create headings inside my table of contents!!! How do I delete the created he | carstj | Word | 3 | 04-11-2016 12:46 PM |
How to create a MS word file that automatically logs something specific inside other WORD files? | meys | Word VBA | 1 | 01-04-2015 05:22 AM |
Invoking a command line from inside Word | bolpom | Word | 1 | 03-16-2011 03:03 AM |