A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Date fields



 
 
Thread Tools Display Modes
  #1  
Old January 18th, 2005, 05:09 PM
Walt G
external usenet poster
 
Posts: n/a
Default Date fields

Is there any way I can arrange it so that when I insert a date into a
document via the Insert menu it uses CREATEDATE rather than DATE? As it is,
even though I have left the 'update automatically' box unchecked, when I for
example change the view from normal to print view, I find all the various
dates in my document relating to the times different parts of it were
created update to the current date. Also, is there any way I can change
dates already inserted into my document via the insert menu to use
CREATEDATE at one time rather than changing each one manually using toggle
field codes?


  #2  
Old January 18th, 2005, 05:57 PM
Greg
external usenet poster
 
Posts: n/a
Default

Walt,

I don't follow the first part of your question. CreateDate sets the
date the document was created and not the date the field was inserted.
If you have a journal or log and need to insert dates as you keep the
log then you need to insert date stamps (text that then never changes).
Here is an example of a macor to insert today's date (whatever day it
is) and format it as text. It will always stay the same.

Sub DateStamp()
' Inserts current date
Selection.InsertDateTime DateTimeFormat:="MMMM dd, yyyy", _
InsertAsField:=False
End Sub


If you want to convert all Date field to CreateDate field, you can use
this macro:

Sub ConvertDateFieldsToCreateDate()
Dim oFld As Field
Dim rngStory As Word.Range
For Each rngStory In ActiveDocument.StoryRanges
Do
For Each oFld In rngStory.Fields
If oFld.Type = wdFieldDate Then
oFld.Code.Text = "CreateDate"
End If
Next
Set rngStory = rngStory.NextStoryRange
Loop Until rngStory Is Nothing
Next
End Sub

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Import Date Fields Otto Contacts 1 December 2nd, 2004 04:26 PM
Date form fields in Word 2003 Andy General Discussion 1 November 11th, 2004 11:06 AM
Filtering on custom date field MED Contacts 3 September 17th, 2004 03:05 PM
QDE (Quick Date Entry) Norman Harker Worksheet Functions 37 September 5th, 2004 01:24 AM
Aggregating Date Data into Weeks and Quarters Roger Running & Setting Up Queries 3 July 11th, 2004 05:56 PM


All times are GMT +1. The time now is 11:41 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.