Not having date auto updated - Help ! 
Author Message
 Not having date auto updated - Help !

I use the templates in Microsoft Word to create memos etc. at work. When I pull
up a saved document, the date in the date field always displays the current
date. I would like to have the document to show the date when the document was
saved the last time. How can I change this?


Wed, 10 Mar 2004 20:08:50 GMT  
 Not having date auto updated - Help !
Hi,

You don't need a VBA (Visual Basic for Applications) solution in this one,
just a change in the field. Try clicking in the date and pressing Shift-F9.
Where it says either DATE or TIME change it to CREATEDATE. Press F9.

For a more permanent solution, you need to change how you insert the date to
start with. See <URL: http://www.addbalance.com/word/datefields1.htm> for
full instructions. Hope this helps.
--
Charles Kenyon

Word New User FAQ & Web Directory:
<URL: http://www.addbalance.com/word/index.htm>

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide)
<URL: http://www.addbalance.com/usersguide/index.htm>

See also the MVP FAQ: <URL: http://www.mvps.org/word/> which is awesome!
 --------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.


Quote:
> I use the templates in Microsoft Word to create memos etc. at work. When I
pull
> up a saved document, the date in the date field always displays the
current
> date. I would like to have the document to show the date when the document
was
> saved the last time. How can I change this?



Thu, 11 Mar 2004 00:57:38 GMT  
 Not having date auto updated - Help !
Hi Musta,

The advice that Charles has given will display the date on which the
document was created.  To have it show the date on which it was last saved,
use a

{ SAVEDATE}

field.

Please post any response to the newsgroups for the benefit of others who may
also be following the thread.

Hope this helps,
Doug Robbins - Word MVP

Quote:
> I use the templates in Microsoft Word to create memos etc. at work. When I
pull
> up a saved document, the date in the date field always displays the
current
> date. I would like to have the document to show the date when the document
was
> saved the last time. How can I change this?



Thu, 11 Mar 2004 04:53:42 GMT  
 Not having date auto updated - Help !
Thank you for your response - Doug !

I tried to do what you recommended. However, I still can't get it to work
correctly. When I F9, the field shows originally { DATE \* MERGEFORMAT }.

When I replace that with { SAVEDATE }, the field will display 00/00/00 0:00
A.M. and will not update to an actual date when I save a document.

Any Ideas?



Thu, 11 Mar 2004 05:40:43 GMT  
 Not having date auto updated - Help !
        Not intending to pose a stupid question, but ... is the clock on the computer
working?  If the clock is dead, I wonder if it's saving one generic date.
        Stephen


Quote:
>Thank you for your response - Doug !

>I tried to do what you recommended. However, I still can't get it to work
>correctly. When I F9, the field shows originally { DATE \* MERGEFORMAT }.

>When I replace that with { SAVEDATE }, the field will display 00/00/00 0:00
>A.M. and will not update to an actual date when I save a document.

>Any Ideas?



Thu, 11 Mar 2004 08:25:54 GMT  
 Not having date auto updated - Help !
Hi Musta,

That is what will be displayed before the document is saved.  Try updating
the field after saving the document.

Please post any response to the newsgroups for the benefit of others who may
also be following the thread.

Hope this helps,
Doug Robbins - Word MVP

Quote:
> Thank you for your response - Doug !

> I tried to do what you recommended. However, I still can't get it to work
> correctly. When I F9, the field shows originally { DATE \* MERGEFORMAT }.

> When I replace that with { SAVEDATE }, the field will display 00/00/00
0:00
> A.M. and will not update to an actual date when I save a document.

> Any Ideas?



Thu, 11 Mar 2004 10:15:51 GMT  
 Not having date auto updated - Help !

Hm.  When I do it inside word, I have no problem.  I change it to SAVEDATE,
then hit F9 to update, and it shows the save date.

Now, when I do it from vba, I change Field.Code to have SAVEDATE instead of
TIME.  Then I call Fields.Update, and it gives me 00/00/00.  Strange?  I
might have to get the save date myself and set the text I want to appear
manually.  Yuck.

This whole thing seems wrong to me somehow.  What I really want is the
time/date that was last stored in the field.  For example:  If I open a doc
at 2:00, the time field gets updated automatically to show 2:00.  Now I save
it at 2:01.  The time field does NOT get updated automatically when I save!
I think 2:00 is still stored in there somewhere, and that is the value I'd
like to keep later when my program goes to print this document.

Note, I've had to do the same thing with Excel, but in Excel there is an
option to set update to manual when opening documents. (Though it is
somewhat tricky, as this "option" is tied to the first workbook... So open
blank workbook, set option to manual, then open the one you don't want to be
auto-updated...)



Quote:
> Hi Musta,

> That is what will be displayed before the document is saved.  Try updating
> the field after saving the document.

> Please post any response to the newsgroups for the benefit of others who
may
> also be following the thread.

> Hope this helps,
> Doug Robbins - Word MVP


> > Thank you for your response - Doug !

> > I tried to do what you recommended. However, I still can't get it to
work
> > correctly. When I F9, the field shows originally { DATE \*
MERGEFORMAT }.

> > When I replace that with { SAVEDATE }, the field will display 00/00/00
> 0:00
> > A.M. and will not update to an actual date when I save a document.

> > Any Ideas?



Mon, 22 Mar 2004 05:28:27 GMT  
 Not having date auto updated - Help !
<Second attempt - last one not posted>

Michael

The fields are not being updated when you save the file. If you wish to
update the fields on save you could intercept the save command by adding the
necessary to updating the fields.
http://www.mvps.org/word/FAQs/MacrosVBA/InterceptSavePrint.htm

The code ActiveDocument.Fields.Update will only update fields in the
document not in headers and footers. If you wish to update fields in the
other stories (a header is a story, the main document is a story etc) you'll
have to loop thru the stories.

Dim oStory As Range
For Each oStory In ActiveDocument.StoryRanges
    oStory.Fields.Update
Next

--
Anna Bohman
Bra Utbildning AB, Sweden


Quote:

> Hm.  When I do it inside word, I have no problem.  I change it to
SAVEDATE,
> then hit F9 to update, and it shows the save date.

> Now, when I do it from vba, I change Field.Code to have SAVEDATE instead
of
> TIME.  Then I call Fields.Update, and it gives me 00/00/00.  Strange?  I
> might have to get the save date myself and set the text I want to appear
> manually.  Yuck.

> This whole thing seems wrong to me somehow.  What I really want is the
> time/date that was last stored in the field.  For example:  If I open a
doc
> at 2:00, the time field gets updated automatically to show 2:00.  Now I
save
> it at 2:01.  The time field does NOT get updated automatically when I
save!
> I think 2:00 is still stored in there somewhere, and that is the value I'd
> like to keep later when my program goes to print this document.

> Note, I've had to do the same thing with Excel, but in Excel there is an
> option to set update to manual when opening documents. (Though it is
> somewhat tricky, as this "option" is tied to the first workbook... So open
> blank workbook, set option to manual, then open the one you don't want to
be
> auto-updated...)



> > Hi Musta,

> > That is what will be displayed before the document is saved.  Try
updating
> > the field after saving the document.

> > Please post any response to the newsgroups for the benefit of others who
> may
> > also be following the thread.

> > Hope this helps,
> > Doug Robbins - Word MVP


> > > Thank you for your response - Doug !

> > > I tried to do what you recommended. However, I still can't get it to
> work
> > > correctly. When I F9, the field shows originally { DATE \*
> MERGEFORMAT }.

> > > When I replace that with { SAVEDATE }, the field will display 00/00/00
> > 0:00
> > > A.M. and will not update to an actual date when I save a document.

> > > Any Ideas?



Mon, 22 Mar 2004 07:18:21 GMT  
 Not having date auto updated - Help !
<Third attempt - last messages not posted>
Michael

The fields are not being updated when you save the file. If you wish to
update the fields on save you could intercept the save command by adding the
necessary to updating the fields.
http://www.mvps.org/word/FAQs/MacrosVBA/InterceptSavePrint.htm

The code ActiveDocument.Fields.Update will only update fields in the
document not in headers and footers. If you wish to update fields in the
other stories (a header is a story, the main document is a story etc) you'll
have to loop thru the stories.

Dim oStory As Range
For Each oStory In ActiveDocument.StoryRanges
    oStory.Fields.Update
Next

--
Anna Bohman
Bra Utbildning AB, Sweden


Quote:

> Hm.  When I do it inside word, I have no problem.  I change it to
SAVEDATE,
> then hit F9 to update, and it shows the save date.

> Now, when I do it from vba, I change Field.Code to have SAVEDATE instead
of
> TIME.  Then I call Fields.Update, and it gives me 00/00/00.  Strange?  I
> might have to get the save date myself and set the text I want to appear
> manually.  Yuck.

> This whole thing seems wrong to me somehow.  What I really want is the
> time/date that was last stored in the field.  For example:  If I open a
doc
> at 2:00, the time field gets updated automatically to show 2:00.  Now I
save
> it at 2:01.  The time field does NOT get updated automatically when I
save!
> I think 2:00 is still stored in there somewhere, and that is the value I'd
> like to keep later when my program goes to print this document.

> Note, I've had to do the same thing with Excel, but in Excel there is an
> option to set update to manual when opening documents. (Though it is
> somewhat tricky, as this "option" is tied to the first workbook... So open
> blank workbook, set option to manual, then open the one you don't want to
be
> auto-updated...)



Mon, 22 Mar 2004 07:21:13 GMT  
 Not having date auto updated - Help !

I'm not interested in updating the fields when they are saved.  My point was
that if we replace the date/time fields with the SAVEDATE then this is not
the value I want.  I want the value that was actually in the fields when the
document was last saved.  I still haven't seen any way to get this.

All the fields I've created for testing have been in the document, not in
the headers or footers.


Quote:
> <Third attempt - last messages not posted>
> Michael

> The fields are not being updated when you save the file. If you wish to
> update the fields on save you could intercept the save command by adding
the
> necessary to updating the fields.
> http://www.mvps.org/word/FAQs/MacrosVBA/InterceptSavePrint.htm

> The code ActiveDocument.Fields.Update will only update fields in the
> document not in headers and footers. If you wish to update fields in the
> other stories (a header is a story, the main document is a story etc)
you'll
> have to loop thru the stories.

> Dim oStory As Range
> For Each oStory In ActiveDocument.StoryRanges
>     oStory.Fields.Update
> Next

> --
> Anna Bohman
> Bra Utbildning AB, Sweden



> > Hm.  When I do it inside word, I have no problem.  I change it to
> SAVEDATE,
> > then hit F9 to update, and it shows the save date.

> > Now, when I do it from vba, I change Field.Code to have SAVEDATE instead
> of
> > TIME.  Then I call Fields.Update, and it gives me 00/00/00.  Strange?  I
> > might have to get the save date myself and set the text I want to appear
> > manually.  Yuck.

> > This whole thing seems wrong to me somehow.  What I really want is the
> > time/date that was last stored in the field.  For example:  If I open a
> doc
> > at 2:00, the time field gets updated automatically to show 2:00.  Now I
> save
> > it at 2:01.  The time field does NOT get updated automatically when I
> save!
> > I think 2:00 is still stored in there somewhere, and that is the value
I'd
> > like to keep later when my program goes to print this document.

> > Note, I've had to do the same thing with Excel, but in Excel there is an
> > option to set update to manual when opening documents. (Though it is
> > somewhat tricky, as this "option" is tied to the first workbook... So
open
> > blank workbook, set option to manual, then open the one you don't want
to
> be
> > auto-updated...)



Tue, 23 Mar 2004 21:33:17 GMT  
 Not having date auto updated - Help !
Hi, Michael,

It sounds like what you want is to lock the fields before saving. This
prevents them from updating until you unlock them.

Manually, Ctrl+F11 to lock the field(s) in the selection, and Ctrl+Shift+F11
to unlock.

In code, use
   ActiveDocument.Fields.Locked = True  ' to lock
   ActiveDocument.Fields.Locked = False  ' to unlock
   ActiveDocument.Fields.Locked = Not ActiveDocument.Fields.Locked
       ' to toggle

or you can isolate particular fields to lock/unlock.

--
Regards,
Jay Freedman
Microsoft Word MVP        Word MVP FAQ site: http://www.mvps.org/word


Quote:

> I'm not interested in updating the fields when they are saved.  My point
was
> that if we replace the date/time fields with the SAVEDATE then this is not
> the value I want.  I want the value that was actually in the fields when
the
> document was last saved.  I still haven't seen any way to get this.

> All the fields I've created for testing have been in the document, not in
> the headers or footers.



> > <Third attempt - last messages not posted>
> > Michael

> > The fields are not being updated when you save the file. If you wish to
> > update the fields on save you could intercept the save command by adding
> the
> > necessary to updating the fields.
> > http://www.mvps.org/word/FAQs/MacrosVBA/InterceptSavePrint.htm

> > The code ActiveDocument.Fields.Update will only update fields in the
> > document not in headers and footers. If you wish to update fields in the
> > other stories (a header is a story, the main document is a story etc)
> you'll
> > have to loop thru the stories.

> > Dim oStory As Range
> > For Each oStory In ActiveDocument.StoryRanges
> >     oStory.Fields.Update
> > Next

> > --
> > Anna Bohman
> > Bra Utbildning AB, Sweden



> > > Hm.  When I do it inside word, I have no problem.  I change it to
> > SAVEDATE,
> > > then hit F9 to update, and it shows the save date.

> > > Now, when I do it from vba, I change Field.Code to have SAVEDATE
instead
> > of
> > > TIME.  Then I call Fields.Update, and it gives me 00/00/00.  Strange?
I
> > > might have to get the save date myself and set the text I want to
appear
> > > manually.  Yuck.

> > > This whole thing seems wrong to me somehow.  What I really want is the
> > > time/date that was last stored in the field.  For example:  If I open
a
> > doc
> > > at 2:00, the time field gets updated automatically to show 2:00.  Now
I
> > save
> > > it at 2:01.  The time field does NOT get updated automatically when I
> > save!
> > > I think 2:00 is still stored in there somewhere, and that is the value
> I'd
> > > like to keep later when my program goes to print this document.

> > > Note, I've had to do the same thing with Excel, but in Excel there is
an
> > > option to set update to manual when opening documents. (Though it is
> > > somewhat tricky, as this "option" is tied to the first workbook... So
> open
> > > blank workbook, set option to manual, then open the one you don't want
> to
> > be
> > > auto-updated...)



Wed, 24 Mar 2004 02:13:36 GMT  
 
 [ 11 post ] 

 Relevant Pages 

1. Task Scheduler Using VBScript not having correct date or time

2. Want to auto update date field based on adding check in another field

3. not to auto update while doing addnew

4. Help: updating text file-Updating Data in a linked table not supported by this ISAM

5. Module changed date not updated.

6. need help on getting the auto-increment value of a field BEFORE updating recordset

7. NotInList auto update! Can anybody help please

8. Updating Date fields in the database not working (CAPA)

9. StatusBar date and time panels not updating

10. Update command not inserting correct date

11. data's modified date as update's date

12. How do you update a null date into an access table date field

 

 
Powered by phpBB® Forum Software