Klaus
Sun Jun 29 05:40:16 PDT 2008
Hi Cristophe,
There's no constant for TeX ...
You can see all the constants in the object browser.
Type the one you've got (wdFormatText) into the search field (with the
binoculars), and you'll see that it belongs to the enumeration wdSaveFormat.
There are only constants/elements for the internal comnverters.
For what you want to do, I think you'll have to look at the external
converters you have installed.
The VBA help for "SaveAs" may help. It has some sample code for the external
WP converters ... see Sub SaveWithConverter()
Sub SaveWithConverter()
Dim cnvWrdPrf As FileConverter
'Look for WordPerfect file converter
'And save document using the converter
'For the FileFormat converter value
For Each cnvWrdPrf In Application.FileConverters
If cnvWrdPrf.ClassName = "WrdPrfctWin" Then
ActiveDocument.SaveAs FileName:="MyWP.doc", _
FileFormat:=cnvWrdPrf.SaveFormat
End If
Next cnvWrdPrf
End Sub
You'd probably first have to iterate through all file converters and find
out the .ClassName for the Word2TeX converter (or find it from its
documentation).
Regards,
Klaus
"Christophe Jorssen" wrote:
> Hello all,
>
> In a Scripting Guy's script, I found the fellowing
>
>
http://www.microsoft.com/technet/scriptcenter/resources/qanda/dec04/
> hey1222.mspx
>
> '
> Const wdFormatText = 2
>
> Set objWord = CreateObject("Word.Application")
> Set objDoc = objWord.Documents.Open("c:\scripts\mylog.doc")
> objDoc.SaveAs "c:\scripts\mylog.txt", wdFormatText
>
> objWord.Quit
> '
>
> My question is: Where can I find the documentation regarding the
> constants the SaveAs method expects (the value of wdFormatText)?
>
> Note: What I'm trying to do is to script the conversion of a lot of files
> from word to LaTeX using word2tex
>
>
http://www.chikrii.com/products/word2tex/dl/
>
> but I don't know what numerical constant that corresponds to the .tex
> format. I will use for this an other Scripting Guy's script
>
>
http://www.microsoft.com/technet/scriptcenter/resources/qanda/apr05/
> hey0401.mspx
>
> Thanks in advance
>
> --
> Christophe