Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
EvieJean EvieJean is offline
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Jay Freedman Jay Freedman is offline
external usenet poster
 
Posts: 9,854
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
EvieJean EvieJean is offline
external usenet poster
 
Posts: 2
Default 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

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Word Doc Date Updates Automatically Craig S Microsoft Word Help 6 February 9th 07 04:18 PM
Create summary Formula field that automatically updates ucmlamb Tables 4 July 15th 06 11:20 AM
Fill-In Field Updates Prompts when in Header or Footer? Bob Page Layout 2 March 8th 06 11:15 PM
Date Time Field that auto updates - Merge Documents niv Microsoft Word Help 1 October 4th 05 04:34 PM
I need to create a field in a form that automatically updates ano. Jaimie Microsoft Word Help 2 February 21st 05 09:48 PM


All times are GMT +1. The time now is 02:08 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"