Documents.OpenNoRepairDialog Method
Opens the specified document and adds it to the Documents collection.
Namespace: Microsoft.Office.Interop.Word
Assembly: Microsoft.Office.Interop.Word (in Microsoft.Office.Interop.Word.dll)
Syntax
'Declaration
Function OpenNoRepairDialog ( _
ByRef FileName As Object, _
ByRef ConfirmConversions As Object, _
ByRef ReadOnly As Object, _
ByRef AddToRecentFiles As Object, _
ByRef PasswordDocument As Object, _
ByRef PasswordTemplate As Object, _
ByRef Revert As Object, _
ByRef WritePasswordDocument As Object, _
ByRef WritePasswordTemplate As Object, _
ByRef Format As Object, _
ByRef Encoding As Object, _
ByRef Visible As Object, _
ByRef OpenAndRepair As Object, _
ByRef DocumentDirection As Object, _
ByRef NoEncodingDialog As Object, _
ByRef XMLTransform As Object _
) As Document
'Usage
Dim instance As Documents
Dim FileName As Object
Dim ConfirmConversions As Object
Dim ReadOnly As Object
Dim AddToRecentFiles As Object
Dim PasswordDocument As Object
Dim PasswordTemplate As Object
Dim Revert As Object
Dim WritePasswordDocument As Object
Dim WritePasswordTemplate As Object
Dim Format As Object
Dim Encoding As Object
Dim Visible As Object
Dim OpenAndRepair As Object
Dim DocumentDirection As Object
Dim NoEncodingDialog As Object
Dim XMLTransform As Object
Dim returnValue As Document
returnValue = instance.OpenNoRepairDialog(FileName, _
ConfirmConversions, ReadOnly, AddToRecentFiles, _
PasswordDocument, PasswordTemplate, _
Revert, WritePasswordDocument, WritePasswordTemplate, _
Format, Encoding, Visible, OpenAndRepair, _
DocumentDirection, NoEncodingDialog, _
XMLTransform)
Document OpenNoRepairDialog(
ref Object FileName,
ref Object ConfirmConversions,
ref Object ReadOnly,
ref Object AddToRecentFiles,
ref Object PasswordDocument,
ref Object PasswordTemplate,
ref Object Revert,
ref Object WritePasswordDocument,
ref Object WritePasswordTemplate,
ref Object Format,
ref Object Encoding,
ref Object Visible,
ref Object OpenAndRepair,
ref Object DocumentDirection,
ref Object NoEncodingDialog,
ref Object XMLTransform
)
Parameters
- FileName
Type: System.Object%
The name of the document (paths are accepted).
- ConfirmConversions
Type: System.Object%
True to display the Convert File dialog box if the file isn't in Microsoft Word format.
- ReadOnly
Type: System.Object%
True to open the document as read-only. This argument doesn't override the read-only recommended setting on a saved document. For example, if a document has been saved with read-only recommended turned on, setting the ReadOnly argument to False will not cause the file to be opened as read/write.
- AddToRecentFiles
Type: System.Object%
True to add the file name to the list of recently used files at the bottom of the File menu.
- PasswordDocument
Type: System.Object%
The password for opening the document.
- PasswordTemplate
Type: System.Object%
The password for opening the template.
- Revert
Type: System.Object%
Controls what happens if FileName is the name of an open document. True to discard any unsaved changes to the open document and reopen the file. False to activate the open document.
- WritePasswordDocument
Type: System.Object%
The password for saving changes to the document.
- WritePasswordTemplate
Type: System.Object%
The password for saving changes to the template.
- Format
Type: System.Object%
The file converter to be used to open the document. Can be one of the WdOpenFormat constants. The default value is wdOpenFormatAuto.
- Encoding
Type: System.Object%
The document encoding (code page or character set) to be used by Microsoft Word when you view the saved document. Can be any valid MsoEncoding enumeration value. The default value is the system code page.
- Visible
Type: System.Object%
True if the document is opened in a visible window. The default value is True.
- OpenAndRepair
Type: System.Object%
True to repair the document to prevent document corruption.
- DocumentDirection
Type: System.Object%
Indicates the horizontal flow of text in a document. Can be any valid WdDocumentDirection constant. The default value is wdLeftToRight.
- NoEncodingDialog
Type: System.Object%
True to skip displaying the Encoding dialog box that Word displays if the text encoding cannot be recognized. The default value is False.
- XMLTransform
Type: System.Object%
Specifies a transform to use.
Return Value
Type: Microsoft.Office.Interop.Word.Document
_Document