Microsoft KB Archive/117120

{|
 * width="100%"|

WD: Temporary Wizard Files (~$name.wiz) Appear on Hard Disk

 * }

Q117120

-

The information in this article applies to:


 * Microsoft Word for Windows, versions 6.0, 6.0a, 6.0c

-

SYMPTOMS
Temporary files that begin with a tilde (~) and have a .wiz extension appear in the directory where your Word for Windows wizards are stored (usually, C:\WINWORD\TEMPLATE).

CAUSE
When you create a new document in Word, Word creates an owner file. Information you enter into the wizard during its operation as well as information about who is currently using the file is stored in the owner file. This file remains until you save the document or quit Word. Closing all open documents within Word has no effect.

Normally, you can add NoOwnerFiles=Yes to the Microsoft Word 6.0 section of the Winword6.ini file to prevent the creation of hidden owner files. However, this option does not work when you use the wizards.

The wizard owner files do not generally pose a problem to system operation.

WORKAROUND
To work around this, use one of the following methods.

Method 1: Rename the wizard to have a .dot extension.

The drawback to this method is that you lose the wizard's functionality.

Method 2: Call the wizard from a macro stored in another template.

The macro below should be stored globally (in the Normal.dot template). It calls the wizard, reattaches to the Normal template, changes the hidden attribute of the wizard owner files, and removes the owner files after completing the StartWizard macro.

Microsoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Microsoft support professionals can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific needs. If you have limited programming experience, you may want to contact a Microsoft Certified Partner or the Microsoft fee-based consulting line at (800) 936-5200. For more information about Microsoft Certified Partners, please see the following page on the World Wide Web:

"http://www.microsoft.com/partner/referral/" For more information about the support options available from Microsoft, please see the following page on the World Wide Web:

"http://support.microsoft.com/directory/overview.asp"

Sub MAIN FileNewDefault FileTemplates .Store = 0, .Template = "c:\public\mywizard.wiz", .LinkStyles = 0 Call StartWizard.MAIN FileTemplates .Store = 0, .Template = "NORMAL", .LinkStyles = 0 On Error Resume Next SetAttr "c:\public\~$wizard.wiz", 0 Kill "c:\public\~$wizard.wiz" End Sub

MORE INFORMATION
Wizard owner files are hidden files that are 54 bytes in length and are stored in the same directory as the wizard. The files are named after the wizard that is in use, but the first two letters are changed to ~$. For example, Award.wiz has an owner file named ~$ard.wiz.

Additional query words: 6.00a macro templates wizards 6.00c word6 hidden owner files tilde temp temporary winword

Keywords : kbtemplate

Issue type : kbprb

Technology : kbWordSearch kbWordWSearch