Class FileConverter (PowerPoint VBA)

The class FileConverter represents a file converter that is used to open or save files. The FileConverter object is a member of the FileConverters collection. The FileConverters collection contains all the installed file converters for opening and saving files. To use a FileConverter class variable it first needs to be instantiated, for example


Dim fcr as FileConverter
Set fcr = FileConverters(Index:=1)

CanOpen

True if the specified file converter is designed to open files.

The CanSave property returns True if the specified file converter can be used to save (export) files.


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

CanSave

True if the specified file converter is designed to save files.

the CanOpen property returns True if the specified file converter can be used to open (import) files.


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

ClassName

Returns a unique name that identifies the file converter.


MsgBox "ClassName= " & FileConverters(1).ClassName & vbCr _
    & "FormatName= " & FileConverters(1).FormatName

Extensions

Returns the file name extensions associated with the specified FileConverter object.


Dim fcr As FileConverter: Set fcr = FileConverters(1)
Dim strExtensions As String
strExtensions = fcr.Extensions

FormatName

Returns the name of the specified file converter.

The format names appear in the Save as type box in the Save As dialog box.


MsgBox FileConverters(1).FormatName

Name

Returns the name of the specified object.


Dim fcr As FileConverter: Set fcr = 
Dim strName As String
strName = fcr.Name

OpenFormat

Returns the file format of the specified file converter.


Dim fcr As FileConverter: Set fcr = 
Dim lngOpenFormat As Long
lngOpenFormat = fcr.OpenFormat

Path

Returns the disk or Web path to the specified object.


Dim fcr As FileConverter: Set fcr = 
Dim strPath As String
strPath = fcr.Path

SaveFormat

Returns the file format of the specified document or file converter.


Dim fcr As FileConverter: Set fcr = 
Dim lngSaveFormat As Long
lngSaveFormat = fcr.SaveFormat