Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 07-18-2019, 12:27 AM
gmayor's Avatar
gmayor gmayor is offline Phone Number Replace ( ) and - with periods    (I'm ALMOST there) Windows 10 Phone Number Replace ( ) and - with periods    (I'm ALMOST there) Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,144
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 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
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Add custom phone number field to Outlook 2013 Contact? King Mustard Outlook 0 06-10-2015 08:12 AM
Phone Number Replace ( ) and - with periods    (I'm ALMOST there) Extracting a phone number from a string that contains text and numbers. hommi16 Excel 2 06-05-2013 09:19 PM
Phone Number Replace ( ) and - with periods    (I'm ALMOST there) Extract phone number from word file donlincolnmsof Word VBA 12 06-19-2012 05:21 PM
Phone Number Replace ( ) and - with periods    (I'm ALMOST there) Phone number formatting Mark Micallef Outlook 1 08-04-2010 02:38 PM
in WORD, how do i type a 9-digit phone number "xxxxxxxxx" and have it automatically.. jay8962 Word 0 04-08-2010 11:08 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:07 AM.


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