Browser: Need to stop Office '03 viewers opening as seperate windows.

I am developing a Browser application in VB5 with an MDIform and WebBrowser controls on Child forms.
Some of the pages we need to display within the browsers contain Word/Excel content.
I have installed the office'03 viewers (word, excel, etc)
Word97 viewer used to display the word document within the browser, but the '03 viewers open up seperate windows.
Is there a way get the '03 viewers to behave the same as the '97 ones or can I 'take ownership' of the viewer window and add it as another child window within my application?
Who is Participating?
schmuck2Connect With a Mentor Author Commented:
Found a solution myself:

Used SetWindowLong & SetParent to 'grab' the viewer and insert it into my app, works a treat!
This link may similar to your problem,
Sorry, I answered the wrong question.
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

schmuck2, can you provide more information, such as code you have done.
However, this link may guide you some considerations:
schmuck2Author Commented:
Hi gnoon,
There is nothing special or different about my code, just an MDIform with toolbar controlling child forms with webBrowser controls on each.
I followed the MS link you provided above, and created the VB project as directed and it behaved the same as my application - the word/excel files open in sperate windows - not within the browser.
Are you able to test the same setup, with the '03 Word, Excel and PP viewers installed?

(points increased to 500)
schmuck2Author Commented:
I found a possible solution here:
But it won't work for wordview.exe or xlview.exe - they still open in seperate windows
(It works fine with notepad.exe)
help! :)
schmuck2Author Commented:
IE has a behavior seem to be like this.
If you open an office document by go to File->Open, browse for a file, and then click OK. It will be open on its own container separately from IE. But if you place the document under your IIS and locate it via the Address box, http://localhost/my2003.doc for exam, it will be open inside the IE window.

However, I tested the code in the link I provided above with v97,2002,2003 on my computer. It works fine either on a stard form and mdichild form.
My computer: win xp version 2002, sp2, office 2002 installed

Notice that VB6 has a type of form called Web Browser. Just add it as a Form.
Maybe you should try.
schmuck2Author Commented:
hi gnoon,
yes, it works for me as well with the full MS Office application installed, but I need it to work with the viewers, eg. Word Viewer, Excel Viewer, PP Viewer.
My application doesn't need to modify the content, only view it, and I don't want to pay for the Office license :)
Sorry, I am not familiar with those MS Viewers spec.
You may consider another solution, PDF file. You can convert a ms office document to a pdf file easily as printing using a free converter called PrimoPDF ( Also, the PDF plug-in for browser is free download.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.