How to retain the size of excel file after using saveas

S

SpiderSwamy

Hi All,

I am facing some size related problem with excel
workbook....

I have a workbook at specific location. I am opening
that file and using saveas option to save it in a different folder. but
the size of the files almost doubles its size when copied to a
different location..

code:
strTempPath = App.Path & "\" & "scip.xls" ' to open where the
application is located.
Set xlAppS = New Excel.Application
Set wbS = xlAppS.Workbooks.Open(strTempPath) ' 'C:\swamy\scip.xls
strName = intGatorNo & "_Report" & ".xls"
strOutFile = strOutFol & "\" & strName 'C:\swamy\1122_Report.xls
On Error GoTo soln
xlAppS.ActiveWorkbook.SaveAs (strOutFile)
soln:
xlAppS.ActiveWorkbook.Close

Thanks in advance
Swamy
 
G

Guest

If all you are doing is opening and doing a saveAs, I would not see any
reason for the file size to change unless you have your default file format
set for the format combination of xl97-2003 & xl95.

try it this way

xlAppS.ActiveWorkbook.SaveAs strOutFile, xlWorkbookNormal
 

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