MS Office Forum / Word / Mailmerge and Fax / March 2004
Weird CreateDate field behavior
|
|
Thread rating:  |
Dawn Rhoads - 22 Mar 2004 18:36 GMT Does anyone know anything about a change in behavior for the createdate field? I checked the knowledgebase and couldn't find anything on it.
I have several forms templates that use a "createdate" field. They were created in Word 2002 sometime last year. They work fine -- when opening a document based on the template, we get the date the *document* was created. I am now updating several other templates to use this same "createdate" field (instead of just a regular date field that always updates to the current date no matter when you open it.)
Here's what's weird. The createdate field that I insert into the new forms is not reliably updating to the creation date of the document -- it seems to be keeping the creation date of the underlying template. What's so odd is that I can even copy the field from one of my functioning forms, put it into a new form, and find that it's still not working right.
The field will sometimes update when I have a locked document and I tab for the first time between fill-in fields. But... knowing our users, not all of them will tab through the fields, many will immediately unlock and then start filling in information by overwriting the fields. Which would mean their "createdate" field will stay screwed up.
In some test documents I made on Friday, now the fields won't even update after I tab through fill in fields -- the ONLY way to get it to update is to hit F9. Yikes!
Printing doesn't update the field (we have to have "update fields" unchecked in our preference -- otherwise Word clears out fill-in fields where we've typed in information. So very handy.) Manually updating with F9 seems to work, but I know NO ONE will do that.
I just can't figure out why I'm getting different behavior in older forms vs. ones I'm trying to make right now. I have the same computer configuration now as I had then (Word 2002, Office XP). The only possible changes I can think of are service packs and my printer driver is now different.
Any thoughts would be welcomed.
Thanks, Dawn Rhoads
Charles Kenyon - 22 Mar 2004 23:01 GMT Hi,
I've been working with CreateDate fields for at least six years in Word 97-2003. The behavior of these fields is very predictable and does not match what you are describing. The behavior I've observed is:
When placed in any document, it will display the creation date of that document. This is true even if placed in the document months after the document is created.
If you use Save As to save the document, the creation date for the document will change but a CreateDate field _in the body_ of the document will not automatically update to the new date. It has to be updated manually or with a macro. In a protected form it cannot be updated manually while the document is protected. A CreateDate field _in the header or footer_ will update when the document is printed or is viewed in Print Preview.
If you have it in a template and create a new document based on the template, the field will display the creation date of the new document. Again, this is true whether it is a protected form or not. If you _open_ the template and use Save As to save to a new name, the field will not update automatically. This is not the proper way to be using a template. I suspect that it is this last situation your users are experiencing. I suspect that the dates that you've seen updating in such documents are in the headers or footers. You can create a new document based on a template by using File => New or by double-clicking on the template from Windows.
By the way, you don't tab between fill-in fields. You do tab between form fields (which are filled in). A fill-in field pops up a message box asking you for information and takes what is typed and puts it into the document. I'm pointing this out not because your term is wrong (it is a sensible thing to call one of these fields), it is just that for those experienced with Word fields, "fill-in field" means something else.
Hope my guesses were correct and that this helps.
 Signature Charles Kenyon
See 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.
> Does anyone know anything about a change in behavior for > the createdate field? I checked the knowledgebase and [quoted text clipped - 46 lines] > Thanks, > Dawn Rhoads Dawn Rhoads - 23 Mar 2004 18:39 GMT I appreciate your thoughts, Charles, but unfortunately none of those are what's going on. And the "normal" behavior of a createdate field is obviously what I've normally observed as well -- we have probably a hundred documents using it right now. This new weirdness is really making me nuts!
I thought I had maybe identified the problem yesterday, but upon testing my templates this morning one of the four I'm testing still does not work properly. I discovered that I had accidentally saved the several documents that I was working on as ".doc" files instead of .dot. (That's something weird my computer seems to be doing all of a sudden as well, it used to be when I opened a template file and made changes to it, when I saved it, it would automatically save as the original file type (that is, .dot) but for whatever reason lately, it defaults to .doc and if I don't catch it it saves in that format. Very odd. I can't for the life of me find a setting or something that I might have changed to make this differece.) Now, used to be, that as long as you accessed a file from the templates dialog box (using File --> New) the item seemed to behave like a template regardless of it's underlying format. But in this case, I found that it made a difference when I re-saved the documents as .dot files. Voila, the createdate field behaved properly (hooray) In all but *one* of my test files. (Grrrr!) I can't imagine why one would behave differently from the others. It's maddening.
The only difference I can identify between my working and non-working test documents is that in the non-working document (by "non-working" I mean the createdate is incorrect unless I manually go in and press F9) the form fields are all placed AFTER the create date. This doesn't really make any sense as the culprit, I don't think, because the hundred or so forms we're currently using that work right are also this way (it just so happens that the next hundred that I'm about to modify generally have form fields at the beginning of the document before the createdate field, so that's why I tested both instances).
I always save templates in either my templates directory or in our workgroup. Then we access the templates by the File --> New, as you mentioned (actually, we normally use a button on a toolbar to get to file --> new, but I don't think that makes any difference)
Thanks for the reminder on the term "form field" vs. "fill in field" -- I can never keep those straight. We pretty much only use field types off the forms toolbar, so I'm not too familiar with the other ones.
Anyway, I've saved yet another test document to see what happens tomorrow (I can't think of a way to test the createdate functioning without waiting a day). If it works, guess I will tentatively go forward with converting my other documents, making sure to save as a .dot file along the way.
If any of this prompts any more thoughts, I'd welcome any additional ideas. Thanks again for trying to help!
--Dawn Rhoads
>-----Original Message----- >Hi, [quoted text clipped - 85 lines] > >. Charles Kenyon - 24 Mar 2004 01:00 GMT Further suspicions,
A .dot file that can be saved as a document is _not_ a Word template. It is a document that has been renamed in Windows to have a .doc extension. There is more to a template than the .dot extension and Word knows the difference.
One way to verify this may be to attempt to save AutoText to the suspect .dot file. Another would be to check for the attached template under Templates and Add-Ins. (I haven't tested these, just tossing ideas out.)
Such a file, if saved as a template will become a Word template and should act normally.
> I appreciate your thoughts, Charles, but unfortunately > none of those are what's going on. And the "normal" [quoted text clipped - 186 lines] > > > >. Dawn Rhoads - 24 Mar 2004 02:34 GMT Hm, interesting. Good tip. I tried this test on my misbehaving "template" and, indeed, I am unable to save autotext to it. Unfortunately, as far as I can tell, once it gets that .dot extension, by all outward indications it looks like a template (uses a template icon, when hovering over the file name in the "open" dialog box it says "Type: Microsoft Word Template"). As you suspected, all the templates that are functioning properly will allow me to save autotext to them, so sounds like they are "really" templates. Bummer if attempting to add autotext is the only way for me to reliably identify it! (I did not try your suggestion about checking for the attached template since I wasn't too sure what that meant. I know where the templates and add-ins dialog box is, I just wasn't sure what I would be looking for.)
So... this must be related somehow to this recent unusual behavior I have noticed when I work on template files. Do you have any ideas on why when I go to save a template file that I've been modifying, Word has been, without asking, saving it as a .doc file? This happens even for those files that I've determined are "really" templates. If there are any autotext entries in the file it will warn me what it's doing, but if there are no autotexts in that file it just does saves the file with a .doc without telling me what it's doing. I have found that I now have to manually go down and choose .dot, then re-navigate to the appropriate folder, and save the file. When initially opening the files I use the File --> Open menu. (Incidentally, I've been doing this for years and not had problems like this. This started in the last few weeks. I thought it must be related to a service pack our Tech Support team recently installed, or some preference that I'd unwittingly changed.) I did find a "default format" in the Tools--> Options, which is set to .doc, but there doesn't seem to be any way to indicate that I want each file to be saved as whatever it started out as.
Does this actually sound like some hinky virus or something yucky like that? I know a collegue who's had similar problems since before mine started (I've been teaching her how to work on our forms, and it seemed like her computer worked differently than mine in how it saved templates, but we couldn't figure out why. I really just thought it must be some combination of preference settings that I couldn't identify yet.)
Thanks again for your thoughts and ideas so far, I sure to appreciate it! It's hardly handy, but at least I can use the autotext thing as a double-check to try to make sure my resulting documents are "really" templates! :) If anything else comes to mind after reading this latest, I'd love to hear your thoughts.
Thanks, Dawn
>-----Original Message----- >Further suspicions, [quoted text clipped - 197 lines] >> >> Thanks, >> >> Dawn Rhoads Charles Kenyon - 24 Mar 2004 21:24 GMT To Windows, all .dot files are templates. To Word, the extension is only a tool. A template with a .doc extension (renamed in Windows) will be treated as a template by Word, and as a document by Windows.
 Signature
Charles Kenyon
See 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.
> Hm, interesting. Good tip. I tried this test on my > misbehaving "template" and, indeed, I am unable to save [quoted text clipped - 315 lines] > >> >> Thanks, > >> >> Dawn Rhoads Charles Kenyon - 24 Mar 2004 21:28 GMT The simple way to identify it is to try Save As...
Usually the default file type for Word to save a document file is as a document.
If you can save it as a .doc file it is not a template, no matter what the extension is. I created a similar problem for myself some time back, renaming a bunch of form documents that I wanted to use as templates. In DOS I used the rename command and changed the extension. As you said, that changed the icon and how Windows treated a double-click. Since they were in the templates folder and I accessed them using File => New, they seemed to be templates within Word as well. I discovered the problem when someone I worked with used File Open and Save As, and was able to save as a document.
 Signature
Charles Kenyon
See 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.
> Hm, interesting. Good tip. I tried this test on my > misbehaving "template" and, indeed, I am unable to save [quoted text clipped - 315 lines] > >> >> Thanks, > >> >> Dawn Rhoads Dawn Rhoads - 24 Mar 2004 23:24 GMT Unfortunately, this is *not* true for me. (I'm on Word 2002, by the way if that makes any difference)
To test and make sure it's not the particular documents I'm working with, I just went ahead and created a brand spanking new template (opened a blank document, did a save as, and chose "word template" as the type) and closed it. Then re-opened it and added some text and tried saving it. I get the same message that "saving in this format will delete all autotext entries" and sure enough, if I do a save as, the document type it is trying to save as is a regular .doc. I can choose .dot from the save as window and it will save as a template (I can re-open and add autotext, as you suggested trying). I've tried opening the document in all different manners (file/open, using the file/open button, opening from Windows Explorer) all with the same result.
Even if I changed my Tools/Options settings for the default file format to be .dot, I get this same result! The only difference is that the first time I save the document, it will default to be a .dot. But after that, I get this same craziness where it tries to make my template into a .doc automatically.
I'm sure you're reading this and thinking it can't possibly be doing as I'm saying, that I must be doing something weird. It sounds nuts to me too.
Well, again, any thoughts you might have are appreciated. I really appreciate your help so far, you've certainly helped me figure out the source of the difficulties with my createdate field! (After re-testing today, by the way, my "actual" templates that have the createdate field in them are working just fine. Thanks!) Now... if only I can figure out why Word is acting nuts with my templates. I guess I at least know how to work around it, by always doing a "save as", choosing "template" and re-navigating to the correct folder. Yuck.
>-----Original Message----- >The simple way to identify it is to try Save As... [quoted text clipped - 331 lines] > >. Charles Kenyon - 25 Mar 2004 16:07 GMT Hi Dawn,
I'm sorry. I was mistaken. I just checked in Word 2003 and you can save a template as a document!
The last time I tried saving a template as a document, the type document was not available. I just checked Word 97 and Word 2000 and in those versions the only type available to save a template using Save As is template. The box for changing types is disabled. I was not aware that this had changed.
You could put the following macro into a global template and attach it to either a custom toolbar button or a keyboard shortcut in that template. Then use it to test your templates.
Sub TemplateTest() Dim strType As String If ActiveDocument.Type = wdTypeTemplate Then strType = "template." ElseIf ActiveDocument.Type = wdTypeDocument Then strType = "document." Else strType = "frameset." End If MsgBox "This is a " & strType End Sub
Sorry again for leading you down a blind alley. Hope this helps.
 Signature
Charles Kenyon
See 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.
--
Charles Kenyon
See 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.
> Unfortunately, this is *not* true for me. (I'm on Word > 2002, by the way if that makes any difference) [quoted text clipped - 463 lines] > > > >.
|
|
|