J
Janis
I want to save a copy as text not the file itself.
Currently this macro works and saves a text mac file "19". If I change it to
saveCopyAs it doesn't work. It does the same thing if I change it to
another file type
so I don't think it has anything to do with the file type.
I don't want to destroy the workbook but I need to save a copy as text.
Why doesn't saveCopyAs work instead of SaveAs?
Sub saveIndesign()
'Appends date to filename so as to not write over an existing file
' saveIndesign Macro
Const fPath As String = "Mac OS X:"
Dim fName As String
Dim myFileName As String
myFileName = Left(ActiveWorkbook.Name, Len(ActiveWorkbook.Name) - 4) &
Format(Now, "yyyymmdd_hhmmss") & ".txt"
fName = fPath & myFileName
Application.DisplayAlerts = False
'do the save
ActiveWorkbook.SaveAs Filename:=fName, FileFormat:=19
Application.DisplayAlerts = True
MsgBox "File Saved to " & fName
End Sub
thanks,
Currently this macro works and saves a text mac file "19". If I change it to
saveCopyAs it doesn't work. It does the same thing if I change it to
another file type
so I don't think it has anything to do with the file type.
I don't want to destroy the workbook but I need to save a copy as text.
Why doesn't saveCopyAs work instead of SaveAs?
Sub saveIndesign()
'Appends date to filename so as to not write over an existing file
' saveIndesign Macro
Const fPath As String = "Mac OS X:"
Dim fName As String
Dim myFileName As String
myFileName = Left(ActiveWorkbook.Name, Len(ActiveWorkbook.Name) - 4) &
Format(Now, "yyyymmdd_hhmmss") & ".txt"
fName = fPath & myFileName
Application.DisplayAlerts = False
'do the save
ActiveWorkbook.SaveAs Filename:=fName, FileFormat:=19
Application.DisplayAlerts = True
MsgBox "File Saved to " & fName
End Sub
thanks,