View Single Post
 
Old 04-01-2023, 09:20 PM
gmayor's Avatar
gmayor gmayor is offline Windows 10 Office 2019
Expert
 
Join Date: Aug 2014
Posts: 4,106
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

I have had a thought about this. If you use Merge and Split or E-Mail Merge Add-in to create the merge, you could run a macro from the process to address the formatting e.g.
Code:
Sub FixID(oDoc As Document)
Dim oRng As Range
Const strFormat As String = "0000 0000 0000 0000 0000 00"
    Set oRng = oDoc.Range
    With oRng.Find
        Do While .Execute(findText:="<[0-9]{22}>", MatchWildcards:=True)
            oRng.Text = Format(oRng.Text, strFormat)
        Loop
    End With
End Sub
__________________
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