save as Mac text file macro

J

Janis

I need to save a worksheet as a delimited text file in order to imp;ort it to
Indisign using a plugin.
I wrote the following macro to save the report as a Mac Text file [mac
text file = I think is value 19]. I have the macros stored in a worksheet
I'll call test. I want to run some cleaning macros from this test worksheet
on a weekly this report saved frm an Access db.

The weird problem is that I can run all my cleaning macros from the blank
test workbook on the report but this one save as text file macro tries to
save the test worksheet as a text file not the open active workbook I'm
trying to save????


-----
Sub saveIndesign()
'Appends date to filename so as to not write over an existing file

' saveIndesign Macro

Const fPath As String = "Mac OS X:jrough:Documents:"
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top