Can You Automate Word Without Office?

P

Phil Galey

I'm automating Word from a VB.NET application using the Word.Application and
Word.Document objects. I have Office installed and I notice that VB.NET is
creating Interops for both Word.dll and Office.dll.

If we want the target machines to only have Word installed and not the whole
Office package, will this automation still be possible, or does it depend on
not only Word but on Office as well? If it is possible with Word only, do I
have to remove Office from the development machine and only have Word
installed so that the Interop to Office will not be present in the package?
Thanks.
 
J

Jezebel

It's a bit like asking if you can have the city but not the buildings.
Office isn't an entity in itself; it's just the name for the suite of
products. If you have *any* of the products installed, you have Office. From
the software development point of view, yes you have to have both DLLs - the
Office DLL handles menus and toolbars amongst other things (ie support
functions used by all the Office apps)..

You can use the VBA ObjectBrowser to see the DLL library's full list of
functions and properties.
 
C

Cindy M.

Hi Phil,

To add to Jezebel's reply:

You can, conceivably, automate any Office application without referencing the
DLLs in your project - by using the .NET equivalent of late-binding. It's
cumbersome (especially if you have Option Strict On), but it does work. You
can search in the Knowledge Base, but here's a place to start:

http://support.microsoft.com/kb/304661/en-us
I'm automating Word from a VB.NET application using the Word.Application and
Word.Document objects. I have Office installed and I notice that VB.NET is
creating Interops for both Word.dll and Office.dll.

If we want the target machines to only have Word installed and not the whole
Office package, will this automation still be possible, or does it depend on
not only Word but on Office as well? If it is possible with Word only, do I
have to remove Office from the development machine and only have Word
installed so that the Interop to Office will not be present in the package?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top