Word, Excel documents in VB.NET

S

Simon Jefferies

Hello,

Is there anyway by using the function CreateObject() (e.g.
CreateObject("Word.Document"), to then display the document inside a VB
form?

TIA
Simon Jefferies
Tools Programmer
Headfirst Productions
 
P

Paul Clement

¤ Hello,
¤
¤ Is there anyway by using the function CreateObject() (e.g.
¤ CreateObject("Word.Document"), to then display the document inside a VB
¤ form?

See the following MS KB article:

HOWTO: Use the WebBrowser Control to Open an Office Document in Visual Basic .NET
http://support.microsoft.com/default.aspx?scid=kb;EN-US;304643


Paul ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)
 
S

Simon Jefferies

Hello,

Thanks for your reply,

Although I found that it didn't work as expected, I get a window to
save/open the document rather than previewing it.

Regards
Simon Jefferies
 
P

Paul Clement

¤ Hello,
¤
¤ Thanks for your reply,
¤
¤ Although I found that it didn't work as expected, I get a window to
¤ save/open the document rather than previewing it.
¤

The only way to preview the document is to open it. You don't need to use the CommonDialog control
to open the document using the WebBrowser control. You can simply use the Navigate method and
specify the path to the file name.

Keep in mind the WebBrowser control will also use your Internet Security settings.


Paul ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)
 

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