标题: 求助:关于WORD2003宏的另存为使用问题 [打印本页] 作者: ycxjy 时间: 2008-1-16 19:48 标题: 求助:关于WORD2003宏的另存为使用问题 因工作需要,我要把很多WORD文档都转换成RTF格式,但它们都在不同的目录里,于是我编写了一段宏,代码如下:
Sub autoopen()
Dim strDocName As String
Dim intPos As Integer
If intPos = 0 Then
strDocName = InputBox("Please enter the name " & _
"of your document.")
Else
strDocName = Left(strDocName, intPos - 1)
strDocName = strDocName & ".rtf"
End If
ActiveDocument.SaveAs FileName:=strDocName, _
FileFormat:=wdFormatRTF
End Sub