Hi Alex,
It is hard to prevent COM to use certain Word instance.
Because when Word start up, it will register it into the ROT(Running Object
Table). So the other COM even can select to attach to certain Word Instance.
How to use Visual C# to automate a running instance of an Office program
http://support.microsoft.com/?scid=kb;en-us;316126
Here is the start up switch in Word 2003 Help file.
<quote>
/safe
Start Word in Office Safe Mode.
/ttemplatename
Start Word with a new document based on a template other than the Normal
template (Normal template: A global template that you can use for any type
of document. You can modify this template to change the default document
formatting or content.). Example: /tMyfax.dot
Note If the file name has spaces in it, enclose the complete name in
quotation marks ¡ª for example, /t"Elegant Report.dot"
Security Because templates can store macro viruses, be careful about
opening them or creating files based on new templates. Take the following
precautions: run up-to-date antivirus software on your computer, set your
macro security level to high, clear the Trust all installed add-ins and
templates check box, use digital signatures, and maintain a list of trusted
sources.
/pxslt
Start Word with a new XML document based on the specified Extensible
Stylesheet Language Transformation (XSLT) (XSL Transformation (XSLT): A
file that is used to transform XML documents into other types of documents,
such as HTML or XML. It is designed for use as part of XSL.). Example:
/p:c:\MyTransform.xsl
/a
Start Word and prevent add-ins (add-in: A supplemental program that adds
custom commands or custom features to Microsoft Office.) and global
templates (including the Normal template) from being loaded automatically.
The /a switch also locks the setting files.
/laddinpath
Start Word and then load a specific Word add-in. Example: /lSales.dll
Security Use caution when running executable files or code in macros or
applications. Executable files or code can be used to carry out actions
that might compromise the security of your computer and data.
/m
Start Word without running any AutoExec macros (macro: An action or a set
of actions that you can use to automate tasks. Macros are recorded in the
Visual Basic for Applications programming language.).
/mmacroname
Start Word and then run a specific macro. The /m switch also prevents Word
from running any AutoExec macros. Example: /mSalelead
Security Because macros can contain viruses, be careful about running
them. Take the following precautions: run up-to-date antivirus software on
your computer; set your macro security level to high; clear the Trust all
installed add-ins and templates check box; use digital signatures; maintain
a list of trusted publishers.
/n
Start a new instance of Word with no document open. Documents opened in
each instance of Word will not appear as choices in the Window menu of
other instances.
/w
Start a new instance of Word with a blank document. Documents opened in
each instance of Word will not appear as choices in the Window menu of the
other instances.
</quote>
Best regards,
Peter Huang
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.