View Single Post
 
Old 07-18-2019, 12:27 AM
gmayor's Avatar
gmayor gmayor is offline Windows 10 Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,105
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

Did you actually attach the data source to the document and complete the merge? It's a bit tortuous but Paul's field codes usually work as intended. This lot is no exception.

Press ALT+F9 to toggle the fields and it shows:

{QUOTE{SET Phone {MERGEFIELD LeadBrokerHtcPhone}}
{IF{REF Phone}= “?1*” 1 {IF{REF Phone}= “?2*” 2 {IF{REF Phone}= “?3*” 3 {IF{REF Phone}= “?4*” 4 {IF{REF Phone}= “?5*” 5 {IF{REF Phone}= “?6*” 6 {IF{REF Phone}= “?7*” 7 {IF{REF Phone}= “?8*” 8 {IF{REF Phone}= “?9*” 9 0}}}}}}}}}
{IF{REF Phone}= “??1*” 1 {IF{REF Phone}= “??2*” 2 {IF{REF Phone}= “??3*” 3 {IF{REF Phone}= “??4*” 4 {IF{REF Phone}= “??5*” 5 {IF{REF Phone}= “??6*” 6 {IF{REF Phone}= “??7*” 7 {IF{REF Phone}= “??8*” 8 {IF{REF Phone}= “??9*” 9 0}}}}}}}}}
{IF{REF Phone}= “???1*” 1 {IF{REF Phone}= “???2*” 2 {IF{REF Phone}= “???3*” 3 {IF{REF Phone}= “???4*” 4 {IF{REF Phone}= “???5*” 5 {IF{REF Phone}= “???6*” 6 {IF{REF Phone}= “???7*” 7 {IF{REF Phone}= “???8*” 8 {IF{REF Phone}= “???9*” 9 0}}}}}}}}}

{IF{REF Phone}= “?????1*” “.1” {IF{REF Phone}= “?????2*” “.2” {IF{REF Phone}= “?????3*” “.3” {IF{REF Phone}= “?????4*” “.4” {IF{REF Phone}= “?????5*” “.5” {IF{REF Phone}= “?????6*” “.6” {IF{REF Phone}= “?????7*” “.7” {IF{REF Phone}= “?????8*” “.8” {IF{REF Phone}= “?????9*” “.9” “.0”}}}}}}}}}
{IF{REF Phone}= “??????1*” 1 {IF{REF Phone}= “??????2*” 2 {IF{REF Phone}= “??????3*” 3 {IF{REF Phone}= “??????4*” 4 {IF{REF Phone}= “??????5*” 5 {IF{REF Phone}= “??????6*” 6 {IF{REF Phone}= “??????7*” 7 {IF{REF Phone}= “??????8*” 8 {IF{REF Phone}= “??????9*” 9 0}}}}}}}}}
{IF{REF Phone}= “???????1*” “1.” {IF{REF Phone}= “???????2*” “2.” {IF{REF Phone}= “???????3*” “3.” {IF{REF Phone}= “???????4*” “4.” {IF{REF Phone}= “???????5*” “5.” {IF{REF Phone}= “???????6*” “6.” {IF{REF Phone}= “???????7*” “7.” {IF{REF Phone}= “???????8*” “8.” {IF{REF Phone}= “???????9*” “9.” “0.”}}}}}}}}}

{IF{REF Phone}= “*1???” 1 {IF{REF Phone}= “*2???” 2 {IF{REF Phone}= “*3???” 3 {IF{REF Phone}= “*4???” 4 {IF{REF Phone}= “*5???” 5 {IF{REF Phone}= “*6???” 6 {IF{REF Phone}= “*7???” 7 {IF{REF Phone}= “*8???” 8 {IF{REF Phone}= “*9???” 9 0}}}}}}}}}
{IF{REF Phone}= “*1??” 1 {IF{REF Phone}= “*2??” 2 {IF{REF Phone}= “*3??” 3 {IF{REF Phone}= “*4??” 4 {IF{REF Phone}= “*5??” 5 {IF{REF Phone}= “*6??” 6 {IF{REF Phone}= “*7??” 7 {IF{REF Phone}= “*8??” 8 {IF{REF Phone}= “*9??” 9 0}}}}}}}}}
{IF{REF Phone}= “*1?” 1 {IF{REF Phone}= “*2?” 2 {IF{REF Phone}= “*3?” 3 {IF{REF Phone}= “*4?” 4 {IF{REF Phone}= “*5?” 5 {IF{REF Phone}= “*6?” 6 {IF{REF Phone}= “*7?” 7 {IF{REF Phone}= “*8?” 8 {IF{REF Phone}= “*9?” 9 0}}}}}}}}}
{IF{REF Phone}= “*1” 1 {IF{REF Phone}= “*2” 2 {IF{REF Phone}= “*3” 3 {IF{REF Phone}= “*4” 4 {IF{REF Phone}= “*5” 5 {IF{REF Phone}= “*6” 6 {IF{REF Phone}= “*7” 7 {IF{REF Phone}= “*8” 8 {IF{ }= “*9” 9 0}}}}}}}}}

}

Don't even try to make that into fields without using Import and export field constructions as text. Copy it from the document.

Or you could simply add another column to your data sheet with the number as text in the correct format and merge that field instead.
__________________
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