asset
04-28-2013, 04:24 AM
Hi!
I'm trying to make a script which allows to choose files and then batch convert them into RTF files.
I have a part for the RTF convert (below). Could someone tell me how to write a part for the loop which will execute this code on all chosen files?
Thanks!
Sub SaveAsRTF()
'getting active document path (without filename and extension
FileName = CreateObject("scripting.filesystemobject").getbasename(ActiveDocument.Name)
'saving as RTF
ActiveDocument.SaveAs FileName:=ActiveDocument.Path & "\" & FileName & ".rtf", FileFormat:=wdFormatRTF
End Sub
I'm trying to make a script which allows to choose files and then batch convert them into RTF files.
I have a part for the RTF convert (below). Could someone tell me how to write a part for the loop which will execute this code on all chosen files?
Thanks!
Sub SaveAsRTF()
'getting active document path (without filename and extension
FileName = CreateObject("scripting.filesystemobject").getbasename(ActiveDocument.Name)
'saving as RTF
ActiveDocument.SaveAs FileName:=ActiveDocument.Path & "\" & FileName & ".rtf", FileFormat:=wdFormatRTF
End Sub