Home All Groups Group Topic Archive Search About

How to embed external document?

Author
13 Jun 2006 5:52 AM
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?

Author
13 Jun 2006 7:48 AM
Vadym Stetsyak
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/architect/dotnet/soa/Easily_utilise_Microsoft_Word_functionality_in_your_NET_application/0,39024710,39198903,00.htm )

--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com
Author
14 Jun 2006 12:46 AM
Lloyd Dupont
thanks!

Show quote
"Vadym Stetsyak" <vady***@ukr.net> wrote in message
news:Onur51rjGHA.4504@TK2MSFTNGP03.phx.gbl...
> 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/architect/dotnet/soa/Easily_utilise_Microsoft_Word_functionality_in_your_NET_application/0,39024710,39198903,00.htm )
>
> --
> Regards, Vadym Stetsyak
> www: http://vadmyst.blogspot.com
Author
13 Jun 2006 7:53 AM
Marcus Heege
Hi Lloyd,

Show quote
"Lloyd Dupont" <net.galador@ld> wrote in message
news:ehGlG2qjGHA.1324@TK2MSFTNGP04.phx.gbl...
> 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
Author
14 Jun 2006 12:50 AM
Lloyd Dupont
thanks!

Show quote
"Marcus Heege" <NOSPAM@heege.net> wrote in message
news:%23urUG6rjGHA.4212@TK2MSFTNGP03.phx.gbl...
> Hi Lloyd,
>
> "Lloyd Dupont" <net.galador@ld> wrote in message
> news:ehGlG2qjGHA.1324@TK2MSFTNGP04.phx.gbl...
>> 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
>
>
>
Author
13 Jun 2006 8:00 AM
Willy Denoyette [MVP]
"Lloyd Dupont" <net.galador@ld> wrote in message
news:ehGlG2qjGHA.1324@TK2MSFTNGP04.phx.gbl...
| 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.
Show quote
|
| 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.
Author
14 Jun 2006 12:46 AM
Lloyd Dupont
thanks!

Show quote
"Willy Denoyette [MVP]" <willy.denoye***@telenet.be> wrote in message
news:uzgE39rjGHA.4660@TK2MSFTNGP03.phx.gbl...
>
> "Lloyd Dupont" <net.galador@ld> wrote in message
> news:ehGlG2qjGHA.1324@TK2MSFTNGP04.phx.gbl...
> | 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.
>
>
>
>
Author
14 Jun 2006 12:53 AM
Lloyd Dupont
> 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...
Author
13 Jun 2006 2:29 PM
Carl Daniel [VC++ MVP]
Lloyd Dupont wrote:
> 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.

Show quote
>
> 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
Author
14 Jun 2006 12:47 AM
Lloyd Dupont
> 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!
Author
13 Jun 2006 5:07 PM
Alexander Nickolov
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: agnicko***@mvps.org
MVP VC FAQ: http://www.mvps.org/vcfaq
=====================================

Show quote
"Lloyd Dupont" <net.galador@ld> wrote in message
news:ehGlG2qjGHA.1324@TK2MSFTNGP04.phx.gbl...
> 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?
>
Author
14 Jun 2006 12:49 AM
Lloyd Dupont
I lost VC5 :(
I have VS2003 & 2005, does it help?

Show quote
"Alexander Nickolov" <agnicko***@mvps.org> wrote in message
news:eaygMvwjGHA.3572@TK2MSFTNGP04.phx.gbl...
> 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: agnicko***@mvps.org
> MVP VC FAQ: http://www.mvps.org/vcfaq
> =====================================
>
> "Lloyd Dupont" <net.galador@ld> wrote in message
> news:ehGlG2qjGHA.1324@TK2MSFTNGP04.phx.gbl...
>> 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?
>>
>
>
Author
14 Jun 2006 5:07 PM
Brian Muth
"Lloyd Dupont" <net.galador@ld> wrote in message
news:e%23$7jx0jGHA.412@TK2MSFTNGP05.phx.gbl...
>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.
Author
15 Jun 2006 2:43 PM
Lloyd Dupont
OK :(
Thanks!

Show quote
"Brian Muth" <bm***@mvps.org> wrote in message
news:uQzx9T9jGHA.4512@TK2MSFTNGP02.phx.gbl...
>
> "Lloyd Dupont" <net.galador@ld> wrote in message
> news:e%23$7jx0jGHA.412@TK2MSFTNGP05.phx.gbl...
>>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.
>
>
>

AddThis Social Bookmark Button