Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create an editable auto date in a Word Form

Status
Not open for further replies.

ksum

Technical User
Dec 7, 2005
11
US
Is there a way to create a field in a form that will display the document's creation date by default, but allow the user to change the date manually? I also want the date to stay as it is. A field that uses the CREATEDATE code but places plane text formatted as a date would be the ultimate goal.

Regards,
Karl Sumwalt
 
If you choose INSERT | DATE AND TIME you can choose not to update automatically. At that point, save it as a TEMPLATE. Then, when someone creates a new document from that template, the CREATION DATE will be there but the field will still be editable. Once edited, it will stay because it's not being told to update. You can format the field as desired but it'll still be a FIELD and not just text. I never tried messing with the header though, so I don't know if you could get Word to put it in as text there. Hope this helps.
 
1. Not quite correct.

"If you choose INSERT | DATE AND TIME you can choose not to update automatically. At that point, save it as a TEMPLATE. Then, when someone creates a new document from that template, the CREATION DATE will be there but the field will still be editable. "

If you choose not to update automatically, the date is inserted as text, not a field. Therefore, if it is saved as a template and a new document is cloned from it, that date will be text. It will NOT be an editiable field, as it will not be a field.

2. "I never tried messing with the header though, so I don't know if you could get Word to put it in as text there. Hope this helps."

Header? The OP never mentioned the header. However, you most certainly can put whatever you want into the header.

ksum, is this not a contrdiction? "that will display the document's creation date by default, but allow the user to change the date manually? I also want the date to stay as it is."

The user can change it manually...but you want the date to stay as it is. Huh? If they change it, how can it stay as it is?

"A field that uses the CREATEDATE code but places plane text formatted as a date would be the ultimate goal."

You could use the CREATEDATE value, and place it as text. It would not be a field though.

faq219-2884

Gerry
My paintings and sculpture
 
Sorry, Gerry, I guess I worded this poorly.

I have a template which is form, and want to have a field in it which will do the following:
~ When the form is first opened as a new document (cloned as a new document) the field provides the current date, formated as Month Day, Year.
~ The operator then has the capability to change that date to a different date, or leave it as is.
~ The date will not change unless it is manually edited.

This field is not in the header or footer. It is for a CD label, but the ultimate technique will also be used for other forms.

The form will be locked so only the fields will accept input.

Karl
 
How about:

{ASK Date \d {CREATEDATE \@"MMM. d, yy" \*MERGEFORMAT}\*MERGEFORMAT}
 
Still not following. WHY does it have to be a field at all?

"I have a template which is form, and want to have a field in it which will do the following:
~ When the form is first opened as a new document (cloned as a new document) the field provides the current date, formated as Month Day, Year.
~ The operator then has the capability to change that date to a different date, or leave it as is.
~ The date will not change unless it is manually edited."

OK. Let's walk through that.

You have a template. It is cloned into a new document. It puts the current date, as text, into the document.

~ When the form is first opened as a new document (cloned as a new document) the field provides the current date, formated as Month Day, Year.

There. Done.

~ The operator then has the capability to change that date to a different date, or leave it as is.
~ The date will not change unless it is manually edited.


The user can change if they want.
If they do not want to, well....there it is, unchanged.

I am not following this. Sure you could use an ASK field. You could use a userform to ask the user. You could use an Inputbox to ask the user.

But, as far as I can see...you are NOT asking the user!

You are:

1. putting in the current date


...and........

nothing. You are not, in fact, DOING anything. There is the date. The user can change it, or not.

What am I missing????? WHY does it have to be any sort of field at all?

faq219-2884

Gerry
My paintings and sculpture
 
Is there a way to create a field in a form that will display the document's creation date by default, but allow the user to change the date manually?

Assuming (and I know it is a big assumption) that when OP refers to a "template", it is in-fact at .dot, then the most straight-forward way of having the creation date displayed in a document created from that template is to insert a {CREATEDATE} field in the template.

An you are correct Gerry, the user could simply type over that field if they wanted to change it. However, some users panic when they click to edit, and the entire date gets highlighted in gray.

The {ASK{createdate}} solution appears to do exactly what the OP appears to be asking for.

I think you're over-thinking.

Requirement -> Solution -> go have a beer. [cheers]

 
Yes this is a .dot template.

We want to lock the form so the user can tab thru the form. As soon as I lock the form, I cannot change the date unless it is a form field. If I make it a text form field and set the type to current date, I cannot edit the date. If I set the type to date, I can input the date, but get no autodate functionality, as I am unable to put {createdate}, or any non-date value, in as the default value.
 
Seems to me you just insert a text form field (or in WOrd 2007 the Date Picker field) that says 'Click here to enter the date'. A simple and effective no brainer.


Regards: tf1
 
If I make it a text form field and set the type to current date, I cannot edit the date. "

Huh? Of course you can. But not as a field.

I will stay out of this as I am apparently overthinking. Although:

"The {ASK{createdate}} solution appears to do exactly what the OP appears to be asking for."

I beg to differ. As I stated...the OP never mentioned, and STILL has not mentioned...a requirement to ask the user anything at all. In fact, the opposite. If you read the OP, it says:

"will display the document's creation date by default"

My bolding.

Does not sounds the OP asked about asking. On the contrary. But..oh well. Yes, perhaps I am overthinking. Although I do agree with you that an ASK field is a quite viable option. ta-ta.

faq219-2884

Gerry
My paintings and sculpture
 
Except that an ASK field doesn't display any output ...

You could overcome that with a FILLIN field, with an embedded CREATEDATE field, coded as:
{FILLIN "What date?" \d {CREATEDATE \@ "dddd d, MMMM yyyy"}}
but then, I don't see why you'd need anything fancier than a simple CREATEDATE field, which can be overtyped anyway:
{CREATEDATE \@ "dddd d, MMMM yyyy"}

Cheers

[MS MVP - Word]
 
I agree. If this is the correct interpretation of the requirements, then just a simple CreateDate is more than sufficient.


Regards: tf1
 
Either I am missing something, or the idea that the form is locked/protected is being ignored. When I put a CREATEDATE field in, and then protect the form, I cannot edit the date without unprotecting the form.

So what am I missing? How does the CREATEDATE field become something I can tab to when I am in a protected form.
 
I must be missing something. Even in a protected Form Template, when you open a new Protected Document from the Template, the CreateDate will update to the current date (the day you create the form).

Obviously it won't update if the CreateDate is in a form field but I am unclear why it needs to be in a form field.

Is thre something I am missing (which isn't unusual)?


Regards: tf1
 
The date does update to the created date of the document, but I cannot edit it if I actually want to use a different date without unprotecting the form, which we do not want. In most casees we will use the create date, but there will be instances where they want to put a different date on the document. The idea is to fill in the most used date, the created date, but be able to edit it if the required date is different.
 
ksum - "The idea is to fill in the most used date, the created date, but be able to edit it if the required date is different."

Then ask them first, and make them put up with their choice.

The issue is whether that edit is to a field, or as text, precisely because you do not want to unprotect. It would be easy to put in the string of CREATEDATE into an editable text formfield. This would keep the document protected. The user could edit, but the edited content would be text, not a field.

faq219-2884

Gerry
My paintings and sculpture
 
You could always upgrade to Word 2007 and ustilise the new Date Picker control.


Regards: tf1
 
Hi ksum,
Either I am missing something, or the idea that the form is locked/protected is being ignored. When I put a CREATEDATE field in, and then protect the form, I cannot edit the date without unprotecting the form.

So what am I missing? How does the CREATEDATE field become something I can tab to when I am in a protected form.
If you want the user to be able to change the value inserted by the CREATEDATE field, you could simply place that field in an unprotected Section.

Cheers


[MS MVP - Word]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top