Temporary parameter for Control does not work in Word (212616)



The information in this article applies to:

  • Microsoft Office Word 2003
  • Microsoft Word 2002
  • Microsoft Word 2000

This article was previously published under Q212616

SYMPTOMS

The Temporary parameter for the Visual Basic for Applications Control object does not work as expected.

CAUSE

The Temporary parameter is an optional argument associated with the Control object. Setting this parameter to True should make the new control temporary. Temporary controls are automatically deleted when the container application is closed.

In Word, when this parameter is set to True, the control should be temporary. However, Word ignores this parameter and the control becomes permanent.

For more information about the temporary parameter, in the Visual Basic Editor, click Microsoft Visual Basic Help on the Help menu, type temporary parameter in the Office Assistant or the Answer Wizard, and then click Search to view the topic.

MORE INFORMATION

The Temporary feature is intended for other applications that do not support session-specific settings. Because Word can store information in global templates or local templates, you can have all the Temporary functionality without using the Temporary flag.

Note You may receive unexpected results when all the following conditions are true:
  • You use a template to store your command bar.
  • Two templates try to place a control in the same postion on the same toolbar.
  • The other template is launched at the same time.

REFERENCES

For more information about getting help with Visual Basic for Applications, click the following article numbers to view the articles in the Microsoft Knowledge Base:

212623 Macro programming resources

226118 Programming resources for Visual Basic for Applications


Modification Type:MinorLast Reviewed:9/12/2006
Keywords:kbdtacode kbnofix kbprb kbProgramming KB212616