Results 1 to 9 of 9
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Wetherby, Yorkshire, England
    Posts
    283
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Date Formats in Mail Merge (W2K SP1)

    For some inexplicable reason one of my date merges in a form letter won't format. Let me explain better. If I use a format switch (@ "d MMMM yyyy") it displays today's date but as soon as I remove the switch it shows the correct date but in the format (UK) 23/08/02 00:00:00.
    Can anyone tell me why this is happening?
    Thanks
    Peter

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

    Re: Date Formats in Mail Merge (W2K SP1)

    A couple of questions: What is you data source - a Word doc, and Excel workbook or Access database? And where are you viewing your field result, in the main document or in the resulting merged document.

    If you are pulling the date from the system clock, the normal template (or whatever template is associated with the main merge doc) will control how a date is displayed by default. If on the other hand you are bringing it in from Excel or Access, they are likely to control the default display, which of course you can change is you indicate. Hope this helps.
    Wendell

  3. #3
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Date Formats in Mail Merge (W2K SP1)

    Hi Peter:
    Go into Start/Settings/Control Panel/Regional Settings/Date tab. Change the default short date style from
    dd/MM/yy h:mm:ss (a guess, based on what you're getting)
    to
    d MMMM yyyy

    BUT, make sure that you will be using that format all the time. You won't be able to get a field to use a shorter format unless you either alter the Regional Settings or use a time switch.
    Cheers,

  4. #4
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Wetherby, Yorkshire, England
    Posts
    283
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Date Formats in Mail Merge (W2K SP1)

    Wendell
    The process starts in Access. My code does a transfertext (Word MailMerge) to a text file and then opens the appropriate Word Doc. Most of the Docs work lt's just 2 that get a recontact date originally from a Access Query via the txt file have suddenly stopped using the date as transferred when it is formatted. If I take the format off it shows the correct date but if I format it, it shows today's date (in the format I want - but wrong date).
    As I say, other merges work so I just can't fathom it.
    Peter

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

    Re: Date Formats in Mail Merge (W2K SP1)

    Hi Peter,
    This is a bit of a puzzle. Question - are you viewing the merged document or are you looking at the main document with the option set to view sample data rather than field codes?
    If it's the latter, try actually mergeing a few records and see what is displayed. If it's the former, is it possible that you've named the field "Date" which will likely confuse Word into supplying the current date rather than the intended field data.

    You might also consider taking your data directly from Access instead of creating a text file - we normally run merges that way unless we want to do some editing of the merge text before we run the merge. There are pros and cons to each approach, but the clutter of text files that get created is eliminated. Let us know what you find.

    Wendell
    Wendell

  6. #6
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Wetherby, Yorkshire, England
    Posts
    283
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Date Formats in Mail Merge (W2K SP1)

    Wendell
    First of all I use a txt file between Access and Word because I operate most things via code from Access and I find opening a mailmarge letter directly linked to Access opens a 2nd Access file usually in a smaller window.
    Plus I often kill the text files after use.
    The date thing is baffling me. It shows today's date in the sample or the merge when formatted. The mergefield record is called Recontact (I changed loads of fields with dodgy names a long time ago) and shows up correctly in the txt file (altho of course not formatted the way I want). I did notice however, that if I remove the time element from the txt record the mergefield then formats the way I want in the Word Doc (does that make sense?)
    Peter

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

    Re: Date Formats in Mail Merge (W2K SP1)

    That is a puzzle - why removing the time portion of the date would cause the date to display the correct information is a mystery. We routinely run date fields in merges and all is happy, though as I indicated in most cases we don't create a text file. BTW, the problem with the second Access window is one that can be solved. Two things can cause that - the first is changing your application name to something other than "Microsoft Access" and the second is using Access security so that you get a login prompt. To make things behave better, change your application name so it says "Microsoft Access - My Application" - the security thing is harder to derail, but usually rears it's head once the merge document has been saved in a confused state. If you are using security, let us know and I'll try to go into some detail.
    Wendell

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

    Re: Date Formats in Mail Merge (W2K SP1)

    I dismissed that article, as it referred to merges using an ODBC data source. Is your text file being used as an ODBC data source?

    BTW, there is a link to the 1-Click TagPanel just to the right of the message subject that will create the HTML to display an active link. You can also type it as [ url ]www.mysite.com[ /url ]. Take out the spaces inside the brackets, and you can do a preview to see what you are about to post.
    Wendell

  9. #9
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Wetherby, Yorkshire, England
    Posts
    283
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Date Formats in Mail Merge (W2K SP1)

    Wendell
    I searched the KB and found this:
    http://support.microsoft.com/default.aspx?...US;q220547&
    (I really should find out how to do do those little links - is it the same as html hyperlinks, I wonder?)
    I thought you and anyone else (including Phil, thanks) who's followed this thread might be interested.
    Peter

    Edited: <!t><!/t> and <!t><!/t> tags added around the URL to make the link live. It's that easy! -Mod.

Posting Permissions

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