Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 01-24-2009, 10:18 AM
Styler001 Styler001 is offline Auto insert current month's name and current year Windows 7 64bit Auto insert current month's name and current year Office 2013
Novice
Auto insert current month's name and current year
 
Join Date: Jan 2009
Posts: 4
Styler001 is on a distinguished road
Default 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.
Reply With Quote
  #2  
Old 01-04-2010, 09:12 AM
jocare jocare is offline Auto insert current month's name and current year Windows 7 Auto insert current month's name and current year Office 2007
Novice
 
Join Date: Nov 2009
Posts: 11
jocare is on a distinguished road
Default

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
Reply With Quote
  #3  
Old 01-04-2010, 12:08 PM
Styler001 Styler001 is offline Auto insert current month's name and current year Windows Vista Auto insert current month's name and current year Office 2007
Novice
Auto insert current month's name and current year
 
Join Date: Jan 2009
Posts: 4
Styler001 is on a distinguished road
Default

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.
Reply With Quote
  #4  
Old 01-25-2010, 06:16 PM
tgebhardt tgebhardt is offline Auto insert current month's name and current year Windows XP Auto insert current month's name and current year Office 2003
Novice
 
Join Date: Jan 2010
Posts: 1
tgebhardt is on a distinguished road
Default 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.
Reply With Quote
  #5  
Old 01-25-2010, 06:40 PM
Styler001 Styler001 is offline Auto insert current month's name and current year Windows Vista Auto insert current month's name and current year Office 2007
Novice
Auto insert current month's name and current year
 
Join Date: Jan 2009
Posts: 4
Styler001 is on a distinguished road
Default

Thanks again for another option. I'll keep this one in mind, too.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto insert current month's name and current year 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

Other Forums: Access Forums

All times are GMT -7. The time now is 03:50 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft