Automation?

  • Thread starter Thread starter perspolis
  • Start date Start date
P

perspolis

I want to use automation property in my program like
Insert Object in Microsoft word.
The automation is for Autocad.
Does anyone has a sample program or plz instruct me?
 
I myself want to implement Insert Object i my program not by word.
I want to insert Autocad maps in my application just it.
 
Hi...

In order to do this, your program needs to be ab OLE Automation container.
The OLE Automation container is responsible for implement a bunch of
interfaces. The object you are hosting will need to implement a bunch of
interfaces as well. If both parties (container and object, i.e., hosted
control) implement the proper interfaces, this will work. This is how MS
Word hosts an Excel spreadsheet, for example. See MSDN and related
materials on building an OLE Automation container. I'd suggest leveraging
the MFC framework to get you started, if possible.

John Puopolo


perspolis said:
I myself want to implement Insert Object i my program not by word.
I want to insert Autocad maps in my application just it.
INGSOC said:
Word can be utilized as a COM object.

Add a reference in your .NET project and instantiate as

Word.Application mw = new Word.Application();

Then access the properties and methods using the mw object.

To find more information, Google ".net c# office interop"
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cssample/ht
 
Back
Top