Minots59
10-27-2011, 10:31 AM
Hello all,
I have this block of code here which will save my opened file as a .rft and add CH_ to the beginning of the filename. Except that when I run it, it saves the file as: CH_Normal.dotm.rtf instead of CH_"filename".rtf. Here's my code:
Sub SaveAsRTF()
Dim existingname As String
Dim stFullname As String
existingname = ThisDocument.Name
stFullname = "CH_" & existingname & ".rtf"
ActiveDocument.SaveAs filename _
:="C:\Documents and Settings\" & stFullname, FileFormat:=wdFormatRTF
End Sub
Any ideas why its changing the filename to the normal.dotm rather than keeping it the existingname?
I have this block of code here which will save my opened file as a .rft and add CH_ to the beginning of the filename. Except that when I run it, it saves the file as: CH_Normal.dotm.rtf instead of CH_"filename".rtf. Here's my code:
Sub SaveAsRTF()
Dim existingname As String
Dim stFullname As String
existingname = ThisDocument.Name
stFullname = "CH_" & existingname & ".rtf"
ActiveDocument.SaveAs filename _
:="C:\Documents and Settings\" & stFullname, FileFormat:=wdFormatRTF
End Sub
Any ideas why its changing the filename to the normal.dotm rather than keeping it the existingname?