View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Macros in Excel - Save as and rename file

Another way would be to use the built in Name statement
Dim sPath as path
ActiveWorkbook.SaveAs Filename:="Bob.CSV", FileFormat:=xlCSV
sPath = ActiveWorkbook.Path
if right(sPath,1) < "\" then sPath = sPath & "\"
ActiveWorkbook.Close
Name sPath & "Bob.CSV" as sPath & "Bob.ps"

Note that this will not make the file a postscript file. You would need
some type of conversion program to do that. Perhaps using Acrobat distiller.

--
Regards,
Tom Ogilvy

Gisle Rong wrote in message
...
Hello
I am to make a postscript (.ps) file from excel, but I cennot save the

excel
worksheet as a .ps file. I have therefore made a macro that saves the
worksheet as a .csv file. However, I have not managed to rename the .csv
file to a .ps file by usint the same macro.

The following is to be done:
Microsoft Excel formet - .csv format - .ps format.

Greatful for any reply.

Gisle Rong