i can't use those fields because it would use the save date from the template
before it merges in to the new document. For some reason it does not carry
any fields (except DATE) or coding across, I think that is done by the
database.
I've added a field to my userform and put some code in so that it
automatically puts the date the userform is initialized (i.e. today)
With CurrentDate
.Value = Now
.Text = Format(CurrentDate, "dddd, d MMMM yyyy")
End With
and then on submission of the form it inserts the result in to the bookmark.
With ActiveDocument
.Bookmarks("CurrentDate").Range.InsertBefore CurrentDate
End With
Seems to be working okay so far!
Thanks for offering a suggestion though!
macropod said:
Hi ivory_kitten,
You might have more success with a SAVEDATE field, which shows the date the document was last saved. Just be careful not
to -resave
the document at a later date unless you want the date to change. Even that can be overcome by selecting the date and pressing
Ctrl-F11 to lock the field, or Ctrl-Shift-F9 to convert it to normal text.
Cheers
--
macropod
[MVP - Microsoft Word]
-------------------------
I have a document template which is opened by an external database which then
merges the contents of the template and the info from the database in to a
new document.
My question is how can I have the "createdate" field show the date of the
creation of the new document, not the template?