Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
OpenDocuments.ViewDocument2 Method

OpenDocuments.ViewDocument2 Method

Windows SharePoint Services 3

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Opens the document for reading instead of editing, so that the document is not locked on the server and in a specified window.


expression.ViewDocument2(pdisp, bstrDocumentLocation, varProgID)

expression

An expression that returns an OpenDocuments Control object.

pdisp

An Object that represents the window from which the ViewDocument2 method is being activated.

bstrDocumentLocation

A string that contains the URL of the document to open for reading.

varProgID

An optional string that contains the ProgID of the application with which to open the document. If this argument is omitted, the default viewer for the document is used.

true if the document was successfully opened; otherwise false.

Use the ViewDocument method to open a document in its appropriate application, instead of inside of an application instance embedded within the browser.

Show:
© 2015 Microsoft