Internet Explorer programming (2)

Source: Internet
Author: User
Tags ole

Internet Explorer programming Overview (2) edit the OLE embedded document in IE

In addition to opening webpages on the internet, Internet Explorer can also browse local folders and files. If you browse PDF or office documents, sometimes you will find that when you call navigate ("xxx.doc, document servers, such as Adobe Reader/acrobat or office, will embed an instance of their own in IE to open the corresponding file. Of course, sometimes they will open the file in an independent acrobat or office window.

In the Property settings window of Adobe Reader/acrobat, we can find the "display PDF in Browser" option. If checked, navigate ("xxx.pdf ") PDF files will be viewed in IE as embedded; otherwise, they will be viewed in an independent Adobe Reader/acrobat window. However, we cannot find this setting in the office "options" dialog box.

Q: How can I control how Ole servers such as office can be opened in my browser?

Answer: Modify the folder option or the registry.

Method 1: Open the "folder" option from the control panel, and find the corresponding file extension name on the "file type" attribute page, such as "Doc ", click the "advanced" button. In the "edit file type" dialog box that appears, the "browse in the same window" option is displayed. If checked, the document is opened by embedding IE, otherwise, it is opened in the independent window.

Method 2: directly modify the registry.

Under the "HKEY_LOCAL_MACHINE/software/classes" key value, the registration information of various file types is saved. Take the Office document as an example. The key values related to the document are as follows.

Document Type key value

Microsoft Excel 7.0 worksheet excel. sheet.5

Microsoft Excel 97 worksheet excel. sheet.8

Microsoft Excel 2000 worksheet excel. sheet.8

Microsoft Word 7.0 document word. document.6

Microsoft Word 97 document word. document.8

Microsoft Word 2000 document word. document.8

Microsoft Project 98 project msproject. project.8

Microsoft PowerPoint 2000 document PowerPoint. show.8

If you want to modify the open mode of a Word document, you can modify the open mode in "HKEY_LOCAL_MACHINE/software/classes/word. under document.8, create a subkey value named "browserflags" and its type is "REG_DWORD". If it is set to "8", open the Word document in an independent window, otherwise, open the document in the word window Embedded in IE.

Note: Microsoft Excel 7.0 worksheet is slightly different. You should set browserflags to "9" to open the document in a separate window.

References:

Msdn: 259970: In-Place activating document servers in Internet Explorer

Msdn: 162059: how to configure Internet Explorer to open office documents ENTs in the appropriate office program instead of in Internet Explorer

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.