Problem displaying some ole docs from within VB 
Author Message
 Problem displaying some ole docs from within VB

I am having a problem displaying some OLE documents from within VB. My
purpose is to use the OLE documents application to display the document. My
code for this is:

OLEObj.SourceDoc = strOLEDocName
OLEObj.CreateLink strOLEDocName
OLEObj.DoVerb vbOLEOpen

This code works for most documents I have tried, e.g. MS Word, MS Excel,
Paintbrush and .txt documents. However, it fails for .jpg images and
.htm documents, giving error 31027 Unable to activate object

Using Windows Explorer, however, and clicking on a .jpg or .htm document
causes  Internet Explorer to activate and display the document. So, why
doesnt it work in the VB code?

Thanks for any help.

SM Haig

Mon, 22 Oct 2001 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. problem displaying some ole Docs in VB

2. Displaying Word Docs from Database OLE Links

3. viewing PDF Docs from Within a VB Program

4. vb and Word docs - OLE

5. Closing Word docs from within Excel macro

6. Manipulating OLE (Excel) Objects within VB Form

7. urgent-Excel Ole within VB possible?

8. OLE display problem (GCM metafile)

9. Displaying external Forms As MDI-Child within VB MDIForm

10. Problem launching Word , Excel docs when VB app is running

11. displaying OLE-object from db in OLE-control

12. VB5 HARD ONE:Locking Word OLE session to other Word Docs


Powered by phpBB® Forum Software