How to embed external document?

  • Thread starter Thread starter Lloyd Dupont
  • Start date Start date
L

Lloyd Dupont

In the good old days I believe people were using the arcane technology which
came to be known as COM+ to embed other application's document in their own
document.

Like a Word with document a Windows Media Player or Excel or Visio document
inside, double click on it and *bang* you coud start edit it using
Excel/WMP/Visio toolbar.

Apparently even OpenOffice could do that.

Now here is my question:
I'm a new generation programmer. Blissfully ignorant of such thing.
But I would like to know and embed Word, Excel or other kind of document in
my application's own document!

How could I do that?

And is there an up-to-date technology (i.e.: .NET API) to do that?
 
Hello, Lloyd!

LD> Like a Word with document a Windows Media Player or Excel or Visio
LD> document inside, double click on it and *bang* you coud start edit it
LD> using Excel/WMP/Visio toolbar.

LD> Apparently even OpenOffice could do that.

LD> Now here is my question:
LD> I'm a new generation programmer. Blissfully ignorant of such thing.
LD> But I would like to know and embed Word, Excel or other kind of
LD> document in my application's own document!

LD> How could I do that?

Using COM-interop.

Look at
( http://support.microsoft.com/kb/302084/en-us )( http://www.builderau.com.au/archite...ur_NET_application/0,39024710,39198903,00.htm )

--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com
 
Hi Lloyd,

Lloyd Dupont said:
In the good old days I believe people were using the arcane technology
which came to be known as COM+ to embed other application's document in
their own document.

Like a Word with document a Windows Media Player or Excel or Visio
document inside, double click on it and *bang* you coud start edit it
using Excel/WMP/Visio toolbar.

Apparently even OpenOffice could do that.

Now here is my question:
I'm a new generation programmer. Blissfully ignorant of such thing.
But I would like to know and embed Word, Excel or other kind of document
in my application's own document!

How could I do that?

And is there an up-to-date technology (i.e.: .NET API) to do that?

the technology you are talking about it OLE (Object Linking and Embedding).

As Vadym has mentioned, you can use COM Interop to automate WinWord, but
this alone is not enough for OLE.

Unfotunately, in Windows Forms itself, there is no good suppot for OLE
Document hosting. In the worst case, you have to use MFC's OLE support which
is quite sophisticated.

Marcus
 
| In the good old days I believe people were using the arcane technology
which
| came to be known as COM+ to embed other application's document in their
own
| document.

COM+ is not arcane and has nothing to do with document embedding, what you
are refering to is extended OLE or Active Document Containment, a COM based
technology.
|
| Like a Word with document a Windows Media Player or Excel or Visio
document
| inside, double click on it and *bang* you coud start edit it using
| Excel/WMP/Visio toolbar.
|
| Apparently even OpenOffice could do that.
|
| Now here is my question:
| I'm a new generation programmer. Blissfully ignorant of such thing.
| But I would like to know and embed Word, Excel or other kind of document
in
| my application's own document!
|
| How could I do that?

Implement an Active Document Container, using a framework like MFC. Please
consult MSDN for details on "Active Document Containers".

|
| And is there an up-to-date technology (i.e.: .NET API) to do that?
|
Kind of, .NET has the "Webbrowser" control which is a container usable from
managed code to embed an OLE server like Word, excel etc.., but the
technology is still OLE (that is COM), and that won't change because of
..NET.
You can also create your own container using a tool like MFC (or Delphi)

Willy.
 
Lloyd said:
In the good old days I believe people were using the arcane
technology which came to be known as COM+ to embed other
application's document in their own document.

As others have said, you're describing OLE.
Like a Word with document a Windows Media Player or Excel or Visio
document inside, double click on it and *bang* you coud start edit it
using Excel/WMP/Visio toolbar.

Apparently even OpenOffice could do that.

Now here is my question:
I'm a new generation programmer. Blissfully ignorant of such thing.
But I would like to know and embed Word, Excel or other kind of
document in my application's own document!

How could I do that?

And is there an up-to-date technology (i.e.: .NET API) to do that?

You can embed any document you want in your own document in any way that you
want. Now, if you expect Word 2003 to be able to activate an embedded Word
document inside your app, then your only choice is OLE. Implementing an OLE
document container on .NET using WinForms might be possible, but it would
take an awful lot of work.

With Office 2007 and Windows Vista comes XPS - Xml Paper Specification. I
believe that the XPS spec fully supports linking and embedding documents -
hopefully there will be some usable managed support for manipulating XPS
documents and perhaps even a standard for embedded activation. But that's
not something you can use today.

-cd
 
If you are interested in learning OLE, the best resource is still
"Inside OLE" by Kraig Brockschmidt, MS Press (circa 1995).
Note this is the second edition of the book. I still have to find
another technical book on any subject with the depth and
breadth of this one... If you have original VC 6.0 installation
CDs, this book is available on the MSDN Library CDs
shipping with VC 6 (in the Books section), but has long since
been removed from mainstream MSDN Library.

--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD
email: (e-mail address removed)
MVP VC FAQ: http://www.mvps.org/vcfaq
=====================================
 
You can embed any document you want in your own document in any way that
you want. Now, if you expect Word 2003 to be able to activate an embedded
Word document inside your app, then your only choice is OLE. Implementing
an OLE document container on .NET using WinForms might be possible, but it
would take an awful lot of work.
mmhh... :(
With Office 2007 and Windows Vista comes XPS - Xml Paper Specification.
I believe that the XPS spec fully supports linking and embedding
documents - hopefully there will be some usable managed support for
manipulating XPS documents and perhaps even a standard for embedded
activation. But that's not something you can use today.
ha! in some distant future it would be possible again!
 
I lost VC5 :(
I have VS2003 & 2005, does it help?

Alexander Nickolov said:
If you are interested in learning OLE, the best resource is still
"Inside OLE" by Kraig Brockschmidt, MS Press (circa 1995).
Note this is the second edition of the book. I still have to find
another technical book on any subject with the depth and
breadth of this one... If you have original VC 6.0 installation
CDs, this book is available on the MSDN Library CDs
shipping with VC 6 (in the Books section), but has long since
been removed from mainstream MSDN Library.

--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD
email: (e-mail address removed)
MVP VC FAQ: http://www.mvps.org/vcfaq
=====================================

Lloyd Dupont said:
In the good old days I believe people were using the arcane technology
which came to be known as COM+ to embed other application's document in
their own document.

Like a Word with document a Windows Media Player or Excel or Visio
document inside, double click on it and *bang* you coud start edit it
using Excel/WMP/Visio toolbar.

Apparently even OpenOffice could do that.

Now here is my question:
I'm a new generation programmer. Blissfully ignorant of such thing.
But I would like to know and embed Word, Excel or other kind of document
in my application's own document!

How could I do that?

And is there an up-to-date technology (i.e.: .NET API) to do that?
 
thanks!

Marcus Heege said:
Hi Lloyd,



the technology you are talking about it OLE (Object Linking and
Embedding).

As Vadym has mentioned, you can use COM Interop to automate WinWord, but
this alone is not enough for OLE.

Unfotunately, in Windows Forms itself, there is no good suppot for OLE
Document hosting. In the worst case, you have to use MFC's OLE support
which is quite sophisticated.

Marcus
 
Implement an Active Document Container, using a framework like MFC. Please
consult MSDN for details on "Active Document Containers".

looking at that...
|
| And is there an up-to-date technology (i.e.: .NET API) to do that?
|
Kind of, .NET has the "Webbrowser" control which is a container usable
from
managed code to embed an OLE server like Word, excel etc.., but the
technology is still OLE (that is COM), and that won't change because of
.NET.
You can also create your own container using a tool like MFC (or Delphi)

interesting idea...
 
Lloyd Dupont said:
I lost VC5 :(
I have VS2003 & 2005, does it help?

No, unfortunately. Moreover the book is out-of-print, but it does
occasionally crop up in second-hand book stores. Your best bet is to ask
around for an old VS6 distribution, with the MSDN Library.
 
OK :(
Thanks!

Brian Muth said:
No, unfortunately. Moreover the book is out-of-print, but it does
occasionally crop up in second-hand book stores. Your best bet is to ask
around for an old VS6 distribution, with the MSDN Library.
 
Back
Top