Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
fill in date field that automatically updates in template
I'm typing daily menus, can that date fields be formated to automatically
upday to the next day and date when I open the template again? Tuesday - July 1, next template to automatically say Wednesday - July 2? -- Thank you Premier 188 |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
fill in date field that automatically updates in template
On Wed, 25 Jun 2008 18:24:00 -0700, EvieJean
wrote: I'm typing daily menus, can that date fields be formated to automatically upday to the next day and date when I open the template again? Tuesday - July 1, next template to automatically say Wednesday - July 2? See http://www.gmayor.com/insert_a_date_...than_today.htm. -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. |
#3
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
fill in date field that automatically updates in template
Hmmm. If the requirement is for the date to be incremented automatically by
one, each time a document is created from the template, then a combination of techniques would be required, with the last used date held in an ini file. The following is a minor variation of a macro I posted a while back, that will type the date at a bookmark location called MenuDate, incremented by one each time the macro is run. The count is stored in a text file saved in the Word startup folder. A second macro allows for the count to be simply reset. The main macro could be run as an autonew macro from the menu template in which the bookmark has been added at the appropriate location. Sub AddMenuDateToBookmark() Dim SettingsFile As String Dim Order As String SettingsFile = Options.DefaultFilePath(wdStartupPath) & "\Settings.ini" Order = System.PrivateProfileString(SettingsFile, _ "MenuDate", "Order") If Order = "" Then Order = 0 End If With Selection .GoTo What:=wdGoToBookmark, _ name:="MenuDate" .TypeText Text:=Format((Date + Order), "dddd d MMMM yyyy") End With Order = Order + 1 System.PrivateProfileString(SettingsFile, "MenuDate", _ "Order") = Order End Sub Sub ResetDateCount() Dim SettingsFile As String Dim Order As String Dim sQuery As String SettingsFile = Options.DefaultFilePath(wdStartupPath) & "\Settings.ini" Order = System.PrivateProfileString(SettingsFile, _ "MenuDate", "Order") sQuery = InputBox("Re-set date count?" & vbCr & _ "Default setting will re-use the last used date" & vbCr & _ "Enter '0' to return to today's date", "Reset", Order - 1) If sQuery = "" Then Exit Sub Order = sQuery System.PrivateProfileString(SettingsFile, "MenuDate", _ "Order") = Order End Sub http://www.gmayor.com/installing_macro.htm -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Jay Freedman wrote: On Wed, 25 Jun 2008 18:24:00 -0700, EvieJean wrote: I'm typing daily menus, can that date fields be formated to automatically upday to the next day and date when I open the template again? Tuesday - July 1, next template to automatically say Wednesday - July 2? See http://www.gmayor.com/insert_a_date_...than_today.htm. |
#4
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
fill in date field that automatically updates in template
Thank you very much for this "fix" I think I'll wait until I'm experienced
enough to understand it. -- Thank you "EvieJean" wrote: I'm typing daily menus, can that date fields be formated to automatically upday to the next day and date when I open the template again? Tuesday - July 1, next template to automatically say Wednesday - July 2? -- Thank you Premier 188 |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Word Doc Date Updates Automatically | Microsoft Word Help | |||
Create summary Formula field that automatically updates | Tables | |||
Fill-In Field Updates Prompts when in Header or Footer? | Page Layout | |||
Date Time Field that auto updates - Merge Documents | Microsoft Word Help | |||
I need to create a field in a form that automatically updates ano. | Microsoft Word Help |