Mega Code Archive

 
Categories / VisualBasic Script / Application
 

Using the SaveAs Method

Sub saveAs()     If TypeName(ActiveInspector) = "Nothing" Then         MsgBox "This macro cannot run because " & _             "there is no active window.", vbOKOnly, "Macro Cannot Run"         End     Else         If ActiveInspector.IsWordMail Then             ActiveInspector.CurrentItem.SaveAs "c:\message.doc"         Else             ActiveInspector.CurrentItem.SaveAs "c:\message.rtf"         End If     End If End Sub