LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 620
Default Macros in Excel - Save as and rename file

Gisle,

This code snippet shows how it can be done


ActiveWorkbook.SaveAs "Bob", FileFormat:=xlCSV
sFile = ActiveWorkbook.Name
sPath = ActiveWorkbook.Path
ActiveWorkbook.Close

Dim objFSO As Object

Set objFSO = CreateObject("Scripting.FileSystemObject").Getfile (sFile)
objFSO.Name = Left(sFile, Len(sFile) - 3) & "ps"
Set objFSO = Nothing


Obviously, as it closes the file it must be in another workbook.


--

HTH

Bob Phillips

"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




 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Save or open file as YYYYMMDD in Macros, how to record it Vijay Kotian Excel Discussion (Misc queries) 1 September 4th 06 02:37 PM
How can I save or open file as YYYYMMDD in Macros Vijay Kotian Excel Discussion (Misc queries) 1 September 4th 06 08:33 AM
Macros Containing a File Save As & Tab Deletions Mike The Newb Excel Discussion (Misc queries) 4 August 16th 06 12:43 PM
How to set SAVE AS file name to equal A1 contents when rename file E Excel Discussion (Misc queries) 0 October 19th 05 08:36 PM
save excel file from a table delimited file (.txt) using macros sedamfo New Users to Excel 1 February 15th 05 04:19 AM


All times are GMT +1. The time now is 07:28 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"