Word, Excel documents in VB.NET

  • Thread starter Thread starter Simon Jefferies
  • Start date Start date
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
 
¤ 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)
 
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
 
¤ 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)
 
I have a control that can do this but I don't give it away unfortunately.

The way I do it is I build projects for clients using the tool.

Here is a screenshot:

http://www.kjmsolutions.com/officecontrol.htm

If you are interested, send email to

(e-mail address removed)

remove nospamhere
 

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

Back
Top