Click here to Skip to main content
15,893,381 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a VB.NET (2005) project that creates a word document using a Word Template (TCI.dot).
The code I have (below) is working as expected.
VB
wapp = New Microsoft.Office.Interop.Word.Application
sDestination = C:\Archive\NewDocName.doc
wapp.Visible = False
docTAPCoverIndex = wapp.Documents.Add(strTapCoverIndexTemplateName)
'Where strTapCoverIndexTemplateName = Template name.

What I want to do is create the wapp object without launching the add-in's that are associated with word. I don't have control of the Office/Word environment.

Any thoughts on how to do this?

Thanks,

Lou Burgoyne
Office Developer
Posted
Updated 28-Jul-10 7:33am
v2

1 solution

This scheme might do the trick...

first start a Word process using the /a switch, like "C:\Program Files\Microsoft Office\Office\Winword.exe /a" or load the document also:
"C:\Program Files\Microsoft Office\Office\Winword.exe" /a /t"c:\documents\test.doc"

Then try to take control over this instance using GetObject.

Good luck!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900