L
Larry
Sorry for repeating this question which I asked at the newusers group,
but I realize this is a vba question.
How can I tell if the file format type of a document is either Word 97
or Word 6.0/95? Consulting the Save As Type box in the Save As only
occasionally gives the correct result.
It seems there ought to be a vba way to do this, but it's tricky. For
example, there's the SaveFormat property, but MsgBox
ActiveDocument.SaveFormat returns 0 for all Word documents, whether they
are Word 97 or Word 6.0/95. So that's no help.
Then there's the FileConverter, but I can't find a way to find what is
the FileConverter for a particular document. For example, this prints
out a list of all the FileConverters in the FileConverters collection,
Dim fc as FileConverter
For Each fc In FileConverters
If fc.CanSave = True Then
Selection.TypeText fc.SaveFormat & vbCr & fc.FormatName & vbCr & vbCr
End If
Next fc
Then there's this, which I got by recording a SaveAs in which the Save
As Type was Word 6.0/95:
ActiveDocument.SaveAs FileFormat:=111
Yet I can't figure how to use this number in an If Then statement to see
if the FileFormat for the ActiveDocument is 111.
Thanks for any help,
Larry
but I realize this is a vba question.
How can I tell if the file format type of a document is either Word 97
or Word 6.0/95? Consulting the Save As Type box in the Save As only
occasionally gives the correct result.
It seems there ought to be a vba way to do this, but it's tricky. For
example, there's the SaveFormat property, but MsgBox
ActiveDocument.SaveFormat returns 0 for all Word documents, whether they
are Word 97 or Word 6.0/95. So that's no help.
Then there's the FileConverter, but I can't find a way to find what is
the FileConverter for a particular document. For example, this prints
out a list of all the FileConverters in the FileConverters collection,
Dim fc as FileConverter
For Each fc In FileConverters
If fc.CanSave = True Then
Selection.TypeText fc.SaveFormat & vbCr & fc.FormatName & vbCr & vbCr
End If
Next fc
Then there's this, which I got by recording a SaveAs in which the Save
As Type was Word 6.0/95:
ActiveDocument.SaveAs FileFormat:=111
Yet I can't figure how to use this number in an If Then statement to see
if the FileFormat for the ActiveDocument is 111.
Thanks for any help,
Larry