Click to See Complete Forum and Search --> : help with embedding
belthree
August 14th, 2002, 01:41 PM
I am trying to embed an office document into my vb form. This is very simple in VB 6.0 with OLE containers but the documentation for .net says that ole containers no longer exist. Using the Web Forms seems too complicated for what I imagine is a simple task. Does anyone know what controls or what not allow me to embed an office document. It doesn't necessarily have to be the document itself. It could be just an icon representing what type of office document it is just like what would happen in an ole container in 6.0 THanks.
ultim8
November 13th, 2002, 07:03 AM
I am trying to do the same, with the additional complication of also trying to embed an ActiveX AutoCAD viewer.
Like Belthree said, this is v. simple in VB6, but cannot get it to work in .NET
Any ideas/suggestions would be appreciated.
Thanks.
Steve.
Athley
November 13th, 2002, 09:11 AM
As you yourself mensioned the .NET documentation says it:
In Visual Basic 6.0, the OLE Container control was used to add insertable OLE objects to your forms. There is no OLE Container control in Visual Basic .NET. If you need the functionality of the OLE Container control, in some cases you can substitute the Visual Basic 6.0 WebBrowser ActiveX control and use it as an OLE Container.
The following link might help you.
Use the WebBrowser Control to Open an Office Document in Visual Basic .NET (http://support.microsoft.com/default.aspx?scid=kb;en-us;304643)
/Leyan
ultim8
November 14th, 2002, 04:43 AM
Thanks,
this works great for office documents.
Does not appear have the flexibility of OLE, as you are restricted to office documents, or what can be displayed in a web browser.
Because of this, if you are displaying an image of some sort, you are relying on the web browsers programitic ability to pan/zoom (ie none)
I would really like to just embed activeX controls in the same way as the web browser, using OLE, but have tried eight or nine different programs and method of doing this, but without a single bit of success.
I think that this is yet another area where Microsoft has taken something powerful and simple to use from VB6, and replaced it with something with little or no documentation, that nobody can figure out how to use!!
Steve.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.