• Date Formats in Mail Merge (W2K SP1)

    Author
    Topic
    #375447

    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

    Viewing 2 reply threads
    Author
    Replies
    • #611072

      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.

      • #611192

        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

        • #611263

          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

          • #611482

            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

            • #611566

              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.

    • #611075

      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,

    • #611797

      Wendell
      I searched the KB and found this:
      http://support.microsoft.com/default.aspx?…US;q220547&%5B/url%5D
      (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: and[/i]%20″] and tags added around the URL to make the link live. It’s that easy! -Mod.

      • #611835

        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.

    Viewing 2 reply threads
    Reply To: Date Formats in Mail Merge (W2K SP1)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: