#1
|
|||
|
|||
Auto insert current month's name and current year
I'm using Office 2007, but save in 2003 format (if that will make a difference in this situation).
I've got a Word document that I want to insert the current month's name and year, but the day of the month will never change. So, in January I would see "January 26, 2009", Feb. would be "February 26, 2009", next year it would be "January 26, 2010", etc. It will always be the 26th, but the month and year will change each month. Are there ways to set this up? I've looked in the fields you can include, but the date format doesn't contain just the month or just the year. |
#2
|
|||
|
|||
I think this macro will do the job for you; just paste it as a macro
Sub specialdate() Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:= _ "CREATEDATE \@ ""MMMM """, PreserveFormatting:=True Selection.TypeText Text:="26, " Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:= _ "CREATEDATE \@ ""yyyy""", PreserveFormatting:=True End sub |
#3
|
|||
|
|||
Wow! One year later. I think I've given up on this one, but I will keep this macro set aside in case the need comes up again. Thanks for the help.
|
#4
|
|||
|
|||
Auto insert current month's name and current year
Had a similar issue and think I found the solution.
Try inserting the date as a field instead, it should work. I don't have 2007, so I don't know where you'll find it in the menus, but in 2003, it's under Insert, Field Field Name = Date In the Date formats box simply type: MMMM 26, yyyy If this doesn't update next month as desired.... then try setting up both pieces of the date that you want updated as separate fields. ie. the month as 1 field, the date as text in the document followed by the second field for just the year. The formats would simply be MMMM or yyyy respectively. If this is in a header or footer, remember fields in headers and footers don't get updated quite as predictably. If you have the date anywhere in the body of your document, you are best served using a StyleRef field in the header or footer to pick it up rather than putting a field in the header/footer. Good Luck. |
#5
|
|||
|
|||
Thanks again for another option. I'll keep this one in mind, too.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Auto Correct to Stay On | sanzlink | Word | 1 | 01-16-2009 06:49 AM |
Insert formatted table into word (mail merge) | manojbmsce | Mail Merge | 0 | 09-25-2008 02:25 AM |
Auto Dial from Contacts | appztester | Outlook | 0 | 06-08-2006 02:52 PM |
Trying to insert hyperlink to excel file into Outlook | KarenE | Outlook | 0 | 05-08-2006 12:56 PM |
Unable to insert AutoShapes | earthling | Word | 0 | 01-01-2006 10:16 AM |