C
Carol Grismore
When I try to run this code (from MS web site):
---------------------------------------------------------------------------
Sub GetConvClassName()
Dim fcCnv As FileConverter
' Create blank document.
Documents.Add
' Loop through all installed converters.
For Each fcCnv In FileConverters
With fcCnv
' If the converter can be used to save...
If .CanSave = True Then
' Insert the converter name and class name in the document.
Selection.TypeText "Converter: " & .FormatName & vbTab _
& "ClassName: " & .ClassName & vbCr
End If
End With
Next fcCnv
End Sub
--------------------------------------------------------------------
I get a message that says:
"Compile error: User-defined type not defined".
The message refers to the
Dim fcCnv As FileConverter
statement.
Do I have to activate a special REFERENCE in order to make this subroutine
work?
Ultimately, I'd like to open a Word document and save it as a .txt file, but
I'm not going to be able to do that unless the file converter will work. I
didn't find anything that I recognized as useful in the Knowledge Base.
Any suggestions are deeply appreciated.
---------------------------------------------------------------------------
Sub GetConvClassName()
Dim fcCnv As FileConverter
' Create blank document.
Documents.Add
' Loop through all installed converters.
For Each fcCnv In FileConverters
With fcCnv
' If the converter can be used to save...
If .CanSave = True Then
' Insert the converter name and class name in the document.
Selection.TypeText "Converter: " & .FormatName & vbTab _
& "ClassName: " & .ClassName & vbCr
End If
End With
Next fcCnv
End Sub
--------------------------------------------------------------------
I get a message that says:
"Compile error: User-defined type not defined".
The message refers to the
Dim fcCnv As FileConverter
statement.
Do I have to activate a special REFERENCE in order to make this subroutine
work?
Ultimately, I'd like to open a Word document and save it as a .txt file, but
I'm not going to be able to do that unless the file converter will work. I
didn't find anything that I recognized as useful in the Knowledge Base.
Any suggestions are deeply appreciated.