CanOpen Property Example

This example determines whether the first file converter is able to open files.

If FileConverters(1).CanOpen = True Then
    MsgBox FileConverters(1).FormatName & " can open files"
End If

This example determines whether the WordPerfect6x file converter can be used to open files. If the CanOpen property returns True, a document named "Test.wp" is opened.

If FileConverters("WordPerfect6x").CanOpen = True Then
    Documents.Open FileName:="C:\Test.wp", _
        Format:=FileConverters("WordPerfect6x").OpenFormat
End If