preview any kind of document in a vb control

Okay, have vb5.

Have got together an email routine. Currently if it is displaying an email that has attachments there is a listbox listing said attachments. If one of the attachments is selected then the appropriate app is launched with the attachment document.

I'd like to avoid launching other apps. I'd like to have one control on the form for displaying attachments. When an attachment is highlighted in the lstbox. I'd like the attachment to appear in this control.

Any ideas, ideally I'd like not to use a 3rd party control...but if there is one that's just suited to this purpose (and that is either free or try before I buy) then I'll take that

thanks for any ideas.

Neil
ntollfreeAsked:
Who is Participating?
 
vinnyd79Connect With a Mentor Commented:
to open a file try:

Private Sub Command1_Click()
WebBrowser1.Navigate2 "C:\excel.xls"
End Sub
0
 
vinnyd79Commented:
Have you tried the webbrowser control?
0
 
ntollfreeAuthor Commented:
I have a web-browser control ?
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
y2kswCommented:
Microsoft Internet Controls = SHDOCVW.DLL
0
 
vinnyd79Commented:
Yes,it is under Microsoft Internet Controls
0
 
ntollfreeAuthor Commented:
does it have a help file ?
0
 
stattoCommented:
Go to project - Components. Scroll down until you see Microsoft Internet Controls. Check it and hit OK. A globe will be added to your toolbar allowing you to drag and drop a browser window, don't know what to do from there but you should have some controls.

Keep in mind this is VB6 I'm using to test this.
0
 
ntollfreeAuthor Commented:
Thank you very much, that's exactly what I was looking for.

Neil
0
All Courses

From novice to tech pro — start learning today.