Results 1 to 13 of 13
  1. #1
    Platinum Lounger
    Join Date
    Dec 2000
    Location
    Queanbeyan, New South Wales, Australia
    Posts
    3,730
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Misuse of templates (W2K)

    Hi,

    This may be have simple answer- I hope so.

    We have templtes which most people are content to open by "File, New", and choosing the style. Or by using the interface we've given them.

    Our problem is now with the programming area- who bypass the normal procedure to take a copy of a template into their only "read only" directories into their own directory, then rename it as a ".doc".

    If they later decide to save their "document" (which is really a template with a "doc" extension) they can only save it as a template. Thre's obviously something in the file which tells Word that this document is a template.

    Is there some way, short of copying all the contents into a clean document, of making Word recognise the template as being really a document and not a template?
    Subway Belconnen- home of the Signboard to make you smile. Get (almost) daily updates- follow SubwayBelconnen on Twitter.

  2. #2
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Morden, Surrey, United Kingdom
    Posts
    1,838
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Re: Misuse of templates (W2K)

    Why can't they open the template (you get the option in File, New but it's easier to just File, Open the templates directory) and Save As into their own directory? Surely it's easier to just make a template into a document than to copy it, rename it (wrongly) and then get annoyed because Word doesn't believe them!

    For that matter, even if there is a way to tell Word that this document is no longer a template, by the time you've copied, renamed and done whatever it is, wouldn't it have been quicker to Open and Save As anyway?!

    Sorry to get on my soapbox but we have this problem with our tech people too (not this specific problem but the generic 'I don't want to do it the proper way but I want it to behave anyway' attitude) and it can get really irritating!

    <gets off soapbox and waves fan about to cool down...!>
    Beryl M


  3. #3
    Silver Lounger Charles Kenyon's Avatar
    Join Date
    Jan 2001
    Location
    Sun Prairie, Wisconsin, Wisconsin, USA
    Posts
    2,048
    Thanks
    124
    Thanked 119 Times in 116 Posts

    Re: Misuse of templates (W2K)

    Hi Geoff,

    In Windows rename the template back to .dot. Then double-click on it, creating a new document based on that template. Save that document. Delete the template.
    Charles Kyle Kenyon
    Madison, Wisconsin

  4. #4
    Platinum Lounger
    Join Date
    Dec 2000
    Location
    Queanbeyan, New South Wales, Australia
    Posts
    3,730
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Misuse of templates (W2K)

    Charfles,

    OK, thanks, nice and simple.

    Next question. We potentially have a lot of these floating around. Is there a way to determine (probably through VBA) which docs asre really templates?
    Subway Belconnen- home of the Signboard to make you smile. Get (almost) daily updates- follow SubwayBelconnen on Twitter.

  5. #5
    Platinum Lounger
    Join Date
    Dec 2000
    Location
    Queanbeyan, New South Wales, Australia
    Posts
    3,730
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Misuse of templates (W2K)

    We've never had this happen with our non-technical users- they just obey instructions. Not only is it more work for them to create docs the way they're doing, it's more work for me to come in later.

    But, now the problem is there, and it's too late to say the document was created incorrectly, and w're going to throw away thier work. We don't know how many docs have been created this way.

    It would have been nice for Word to have an option which let me save it as a document. Charles' method lets me get around Word's limitation, but it would have been nicer for Word to have been more flexible.
    Subway Belconnen- home of the Signboard to make you smile. Get (almost) daily updates- follow SubwayBelconnen on Twitter.

  6. #6
    Silver Lounger Charles Kenyon's Avatar
    Join Date
    Jan 2001
    Location
    Sun Prairie, Wisconsin, Wisconsin, USA
    Posts
    2,048
    Thanks
    124
    Thanked 119 Times in 116 Posts

    Re: Misuse of templates (W2K)

    Don't have the code handy but VBA does know what kind of animal it has hold of. I think the constants are wdTypeDocument and wdTypeTemplate but am unsure. The MVP site has a macro for running a search and replace on a folder full of documents that could be adapted for batch processing.

    With template active and then a document active in Word, try the following in the VBE immediate Window:
    ? ActiveDocument.Type

    It should give you the contants. You could have your macro 1) save the full name of the "document" to a variable, 2) save the misnamed document (as a template) to a temporary templates folder, 3) hold that full name in a second variable, 4) create a new document based on the newly-saved template, and 5) save that new document over the old one using the name saved in your first variable. Then perhaps attach the new document to normal.dot and delete the template from your temporary templates folder. Enjoy!
    Charles Kyle Kenyon
    Madison, Wisconsin

  7. #7
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Morden, Surrey, United Kingdom
    Posts
    1,838
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Re: Misuse of templates (W2K)

    Yup, Chas has probably got your best bet there! I must admit, speaking as the same sort of person as yourself, from the sound of it (ie technical on the office side, rather than the hardware/network type side) I have found the same thing - tech people who think they know what they are doing are the most difficult ones!

    You'd think it would occur to them that the fact that the file has a different suffix might mean it was a different type of document, wouldn't you? I mean, they wouldn't expect to rename an .exe file with .doc and open it to read in Word, would they?!

    Oh well. Hope you get Chas's macro running!

    (Mind you, it would be funny if it turned out that the way the wdtypetemplate or whatever tells whether it's a template or not was by the suffix, wouldn't it?! ... No ... it wouldn't ... don't be nasty, Beryl ... <img src=/S/scold.gif border=0 alt=scold width=50 height=15>)
    Beryl M


  8. #8
    Gold Lounger
    Join Date
    Dec 2000
    Location
    New Hampshire, USA
    Posts
    3,386
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Misuse of templates (W2K)

    Renaming a template as .doc does not change the characteristics of the file, it is still a template.

    Once a file is saved as a template, it cannot be saved as a document, the name is not relevant.

  9. #9
    Gold Lounger
    Join Date
    Dec 2000
    Location
    New Hampshire, USA
    Posts
    3,386
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Misuse of templates (W2K)

    If ActiveDocument.Type = wdTypeTemplate Then
    Debug.Print "Template"
    End If

  10. #10
    2 Star Lounger
    Join Date
    Mar 2001
    Location
    Oregon, USA
    Posts
    129
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Misuse of templates (W2K)

    Or, use FileSearch to open the docs and set .FileName to "*.doc" and .FileType to msoFileTypeTemplates. That should target the offending files pretty well.

    HTH,

    Chris

  11. #11
    Gold Lounger
    Join Date
    Dec 2000
    Location
    New Hampshire, USA
    Posts
    3,386
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Misuse of templates (W2K)

    You cannot change the file type of a template.

    Type is a read-only property.

  12. #12
    Silver Lounger Charles Kenyon's Avatar
    Join Date
    Jan 2001
    Location
    Sun Prairie, Wisconsin, Wisconsin, USA
    Posts
    2,048
    Thanks
    124
    Thanked 119 Times in 116 Posts

    Re: Misuse of templates (W2K)

    One note, if you detach and delete the template any macros and AutoText in the template will be gone (not sure about keymapping or toolbars but I suspect they would be gone, too). I can think of two responses:
    (1) "Did it really? Fancy, that!"
    (2) "All you need to do is find the original template that you copied and reattach it. Oh, you added your own to your template? Well, if you want to come in this weekend we can go through the backups and try to recover it. Next time, you might want to try saving a template as a template so that the virus checker won't strip it like that."

    Or... you could not have them deleted but have that templates directory accessible only by you so you can parcel out the "recovered" templates after much hand wringing and using statements one or two.
    Charles Kyle Kenyon
    Madison, Wisconsin

  13. #13
    2 Star Lounger
    Join Date
    Mar 2001
    Location
    Oregon, USA
    Posts
    129
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Misuse of templates (W2K)

    Hi Howard,

    I'm aware of that. Perhaps I was unclear. My point was that you could use FileSearch to open only files with a .doc extension and a file type of template, eliminating the need to open every document and test its type from ActiveDocument.

    Regards,

    Chris

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •