Insert date and time in Word

Anonymous
2012-12-03T03:18:02+00:00

In Region and Language when I set the date as follows:  dddd, MMMM d, yyyy   It shows this way:  ‎Sunday, ‎December ‎2, ‎2012  Yet when I use the insert date and time in Word it comes out:  Sunday, December 02, 2012   Until this latest Windows or Vista I never had this problem. Any ideas?

I use Windows 7, Microsoft Word 2007.

Microsoft 365 and Office | Word | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

43 answers

Sort by: Newest
  1. Doug Robbins - MVP - Office Apps and Services 323.6K Reputation points MVP Volunteer Moderator
    2012-12-06T21:50:05+00:00

    That is what I had to do.

    The thing is that with the Long Date set at dddd, MMMM dd, yyyy in the Control Panel, with English (U.S.) selected in the Insert Date dialog, the result is dddd, MMMM dd, yyyy.  However if English (Aus) is selected in that dialog, the result is dddd, d MMMM yyyy.  Now one can anticipate the day coming before the month for Australian English, but where did the second d go to.  One would expect dddd, dd MMMM yyyy based on the Control Panel Long Date setting

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2012-12-06T20:58:31+00:00

    What do you mean "... and named it DateDoneRight"?

    It is already named DateLongStamp.

    1.  Close down Word, then open Word

    1. Open the VBE (Alt+F11)

    3. Locate and select the project in the Project Explorer (Project pane).  The project  you select will be called "Project (Document 1).

    4.  Expand that tree (click the little + sign on the left)

    5.  Expand the Microsoft Word Object tree (click the little + sign on the left)

    1. Dbl-Click "ThisDocument"
    2. In the big empty code window on the right of the VBE, paste in:

    Sub DateLongStamp()

     'Inserts current date

     Selection.InsertDateTime DateTimeFormat:="dddd, MMMM d, yyyy", InsertAsField:=False

    End Sub

    8.  Press the F8 key (three times to step through the code) or press F5 to run the code, or press "Run>Run Sub/Userform" on the VB Editor menu.

    9.  Close the VBE and look at your document.

    What is the result?

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2012-12-06T20:29:08+00:00

    The "Project Explorer" is the "Project" pane in the VB Editor.

    Press Alt+F11 to display the VB Editor.  If not displayed, display the Project Explorer pane by using the VB Editor "View" menu and select "Project Explorer."

    It is is becoming clear to me that my instrutions for installing and employing a macro are not as clear or helpful as I had hoped they would be.  If you don't mind, and if you get it sorted out, please send me feedback as to what you think I should change to make it easier to understand.

     

    • I locate and select the project in Project Explorer.
    • Use the VBE "Insert" menu to insert a new standard module.
    • Select the new module and use the Properties Window "Name" property to give my new module a meaningful name (e.g., I often name my modules modMain).
    • Paste my procedure into the main code pane.

    I then immediately step through the new procedure using F8 or run the procedure using the VBE toolbar or menu commands.

    I did the above and named it DateDoneRight and then F8 and I get "Compile error invalid outside procedure"

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2012-12-06T18:23:56+00:00

    The "Project Explorer" is the "Project" pane in the VB Editor.

    Press Alt+F11 to display the VB Editor.  If not displayed, display the Project Explorer pane by using the VB Editor "View" menu and select "Project Explorer."

    It is is becoming clear to me that my instrutions for installing and employing a macro are not as clear or helpful as I had hoped they would be.  If you don't mind, and if you get it sorted out, please send me feedback as to what you think I should change to make it easier to understand.

    Was this answer helpful?

    0 comments No comments
  5. Anonymous
    2012-12-06T18:07:22+00:00

    Greg, I got as far as: "Then copy UpdateAllFields procedure shown above and paste it in the VBE code pane below the Option Explicit statement (if present)."

    But the top right hand corner doesn't read UpdateAllFields instead it says: (Declarations) and the drop down arrow brings Macro1 Macro2, Macro3, Macro4 and Macro5. One of them is probably my AutoCorrect Utility which I use. The newest is Macro5:

    'Macro5 Macro

    ' DateLongStamp()

    Now what?

    I wonder if I just change the “MMMM d, yyyy”, False, to read “MMMM d, yyyy”, True? Would that do it?

    It is highly unlikely that you will screw it up. The downside would be directly proportional to the degree of screw up as highly as unlikely as that is.

    IMHO Word is like a Maserti.  Those who elect not to use macros keep it in first gear.

     

    Greg,

    Where do I find: "I locate and select the project in Project Explorer."

    I went to Start menu and pasted Project Explorer but didn't see it. 

    Was this answer helpful?

    0 comments No comments