Results 1 to 6 of 6
  1. #1
    Star Lounger
    Join Date
    Sep 2004
    Location
    St. Louis, Missouri, USA
    Posts
    83
    Thanks
    0
    Thanked 0 Times in 0 Posts

    mask doesn't mail merge (Office 2003 - XP)

    Hi,
    When I mail merge from Word using and Access query with underlying masks (i.e., phone number as ( ) xxx-xxxx), the mask doesn't come across and I get simply xxxxxxxxxx. Is there a way to correct this or do I have to enter all of the phone numbers without a mask?
    Thanks,
    Lana

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: mask doesn't mail merge (Office 2003 - XP)

    When you use input masks to enter data in a database the supplemental characters of the mask are not stored in the field. Just the data you enter.
    To render the right format you have to build your own format in the query. Use something like this in the query :
    FormatedTelNr: "(" & Left([telnr],3) & ") " & Mid([telnr],4,3) & "-" & Right([telnr],4)
    and use the field FormatedTelNr in your mail merge
    Francois

  3. #3
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: mask doesn't mail merge (Office 2003 - XP)

    One solution is to store the phone number with the mask info - that's an option on the mask. If you are only storing North American Dialing Plan numbers (10 digits) that works pretty well - but if you have any international numbers, masks frankly don't work that well. In any event if you are using data for a merge, it will only return what has been stored in the table. Another option would be to write some text string functions to manipulate the number and add the dashes back in, but it's a fair bit of work. We always store the full formatted number.
    Wendell

  4. #4
    Star Lounger
    Join Date
    Sep 2004
    Location
    St. Louis, Missouri, USA
    Posts
    83
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: mask doesn't mail merge (Office 2003 - XP)

    Hi,
    Thanks for the input - I used the syntax from Francois and it worked fine, once I added the IIf(is null) feature for the blank ones. Reminded me of another question, though - if you set a mask, can you then override that mask for specific records? Or do you have to enter all the data in a field without a mask if you have some that need other input (e.g., I have some fields that call for N/A when there is no number)? I LOOOOVE this forum!
    Lana

  5. #5
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: mask doesn't mail merge (Office 2003 - XP)

    Well, a bit more on the input mask and how it can be controlled. You can specify that the literal characters in the mask, e.g. the dashes or parens depending on your choice, be saved in the data, or not. That is controlled in the mask definition - see the second section in the extract from help that is attached below. As to how to deal with specific exceptions, you nearly always have to program them in. For example, we built a database that stored mostly North American phone numbers, but had about 5000 international numbers as well. What we did was build a VBA routine that looked at the first character typed in the text box - if it was a digit other than 0, then we applied a North American phone number mask. If it was zero, we turned the input mask off and let user's blaze away. (That's because we insisted they put the 011 US direct dial code for international calls on all international numbers.) Hope this helps a bit more.
    Wendell

  6. #6
    Star Lounger
    Join Date
    Sep 2004
    Location
    St. Louis, Missouri, USA
    Posts
    83
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: mask doesn't mail merge (Office 2003 - XP)

    Wendell,

    I wanted to thank you for not giving up on me. I would have sworn that I chose the store option when I created those masks, but apparently I wasn't consistent. Only one of the three had the ;0; after the mask. I finally had time to test it and it works just fine. Thank you - while the query syntax certainly worked nicely, it was as you suggested, a fair amount of work.

    Lana

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •