Class FileConverter (Word VBA)

The class FileConverter represents a file converter that's 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.

Set

To use a FileConverter class variable it first needs to be instantiated, for example

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

The following procedures can be used to set variables of type FileConverter: FileConverters.Item and Application.FileConverters

For Each

Here is an example of processing the FileConverter items in a collection.

Dim fcr As FileConverter
For Each fcr In FileConverters
	 If fcr.CanOpen = True Then MsgBox fcr.OpenFormat & vbCr & fcr.FormatName
Next fcr

Themes

The following procedures in this class have been grouped together and are described on a separate theme page

Name with its procedures ClassName, FormatName and Name

Properties

CanOpen true if the specified file converter is designed to open files.

Dim booCanOpen As Boolean
booCanOpen = FileConverters(1).CanOpen

CanSave true if the specified file converter is designed to save files.

Dim booCanSave As Boolean
booCanSave = FileConverters(1).CanSave

Extensions returns the file name extensions associated with the specified FileConverter object.

Dim strExtensions As String
strExtensions = FileConverters(1).Extensions

OpenFormat returns the file format of the specified file converter.

Dim lngOpenFormat As Long
lngOpenFormat = FileConverters(1).OpenFormat

Parent returns an object that represents the parent object of the specified FileConverter object.

Dim objParent As Object
Set objParent = FileConverters(1).Parent

Path returns the disk or Web path to the specified object.

Dim strPath As String
strPath = FileConverters(1).Path

SaveFormat returns the file format of the specified document or file converter.

Dim lngSaveFormat As Long
lngSaveFormat = FileConverters(1).SaveFormat

FileConverters.ConvertMacWordChevrons controls whether text enclosed in chevron characters (« ») is converted to merge fields. Read/write Long.

FileConverters.ConvertMacWordChevrons = wdAlwaysConvert

FileConverters.Count returns a Long that represents the number of file converters in the collection.

Dim lngCount As Long
lngCount = FileConverters.Count

FileConverters.Parent returns an object that represents the parent object of the specified FileConverters object.

Dim objParent As Object
Set objParent = FileConverters.Parent