From: SAC on
Perfect! Guess it would help if I didn't have it commented out!! :-)

Also, I searched Tecnet for the 43 number as the file format. Where can I
find different options for different commands in vbscript?

Thanks so much for your help!!!


"ekrengel" <erickrengel5(a)gmail.com> wrote in message
news:75239645-08a6-494d-ad7f-3dbb70d793bc(a)34g2000yqp.googlegroups.com...
On Jan 11, 8:31 pm, "SAC" <s...(a)somewhere.com> wrote:
> I need to run this unattended within a stored procedure on a sql server so
> I
> can't have the messages, etc.
>
> Here's what I have now, but it didn't change the file...
>
> Set objFSO = CreateObject("Scripting.FileSystemObject")
>
> 'Delete Backup File first
> objFSO.DeleteFile("\\Vadenmclp01\groups\Vangent
> Facilities\FMDesktop\Peoplesoft HR Data\PS_FMDesktop1.xls")
>
> 'Copy to a Backup File
> 'objFSO.MoveFile "\\Vadenmclp01\groups\Vangent
> Facilities\FMDesktop\Peoplesoft HR Data\PS_FMDesktop.xls" ,
> "\\Vadenmclp01\groups\Vangent Facilities\FMDesktop\Peoplesoft HR
> Data\PS_FMDesktop1.xls"
>
> objFSO.CopyFile "\\Vadenmclp01\groups\Vangent
> Facilities\FMDesktop\Peoplesoft HR Data\PS_FMDesktop.xls" ,
> "\\Vadenmclp01\groups\Vangent Facilities\FMDesktop\Peoplesoft HR
> Data\PS_FMDesktop1.xls", OverwriteExisting
>
> Set objExcel = CreateObject("Excel.Application")
> Set objWorkbook = objExcel.Workbooks.Open("\\Vadenmclp01\groups\Vangent
> Facilities\FMDesktop\Peoplesoft HR Data\PS_FMDesktop.xls")
>
> objExcel.Application.Visible = False
>
> objExcel.Application.DisplayAlerts = False
>
> 'objExcel.ActiveWorkbook.SaveAS "\\Vadenmclp01\groups\Vangent
> Facilities\FMDesktop\Peoplesoft HR Data\PS_FMDesktop.xls", Fileformat=43
> 'It's a 2003 file .......... Fileformat=xlNormal
> objExcel.ActiveWorkbook.Close
>
> objExcel.Quit
> Set objExcel = Nothing
>
> Any more ideas?
>
> Also, where can I find the
>


Your not actually saving anything, you have the SaveAS line commented
out. If your using excel 2003, the SaveAS code is 43. If it's 2007,
then it's 56. Just change this line:

'objExcel.ActiveWorkbook.SaveAS "\\Vadenmclp01\groups\Vangent
Facilities\FMDesktop\Peoplesoft HR Data\PS_FMDesktop.xls",
Fileformat=43
'It's a 2003 file .......... Fileformat=xlNormal

WITH THIS:

objExcel.ActiveWorkbook.SaveAS "\\Vadenmclp01\groups\Vangent
Facilities\FMDesktop\Peoplesoft HR Data\PS_FMDesktop.xls", 43

From: SAC on
There is another file type that I think I need.

I'm using MS Excel 2003 and when I do a file save as with it, file type 43
shows it as:

"Microsoft Excel 97 - Excel 2003....."

I need the one that just reads "Microsoft Office Excel Workbook"

Which number would that one be?

Thanks again!

"ekrengel" <erickrengel5(a)gmail.com> wrote in message
news:75239645-08a6-494d-ad7f-3dbb70d793bc(a)34g2000yqp.googlegroups.com...
On Jan 11, 8:31 pm, "SAC" <s...(a)somewhere.com> wrote:
> I need to run this unattended within a stored procedure on a sql server so
> I
> can't have the messages, etc.
>
> Here's what I have now, but it didn't change the file...
>
> Set objFSO = CreateObject("Scripting.FileSystemObject")
>
> 'Delete Backup File first
> objFSO.DeleteFile("\\Vadenmclp01\groups\Vangent
> Facilities\FMDesktop\Peoplesoft HR Data\PS_FMDesktop1.xls")
>
> 'Copy to a Backup File
> 'objFSO.MoveFile "\\Vadenmclp01\groups\Vangent
> Facilities\FMDesktop\Peoplesoft HR Data\PS_FMDesktop.xls" ,
> "\\Vadenmclp01\groups\Vangent Facilities\FMDesktop\Peoplesoft HR
> Data\PS_FMDesktop1.xls"
>
> objFSO.CopyFile "\\Vadenmclp01\groups\Vangent
> Facilities\FMDesktop\Peoplesoft HR Data\PS_FMDesktop.xls" ,
> "\\Vadenmclp01\groups\Vangent Facilities\FMDesktop\Peoplesoft HR
> Data\PS_FMDesktop1.xls", OverwriteExisting
>
> Set objExcel = CreateObject("Excel.Application")
> Set objWorkbook = objExcel.Workbooks.Open("\\Vadenmclp01\groups\Vangent
> Facilities\FMDesktop\Peoplesoft HR Data\PS_FMDesktop.xls")
>
> objExcel.Application.Visible = False
>
> objExcel.Application.DisplayAlerts = False
>
> 'objExcel.ActiveWorkbook.SaveAS "\\Vadenmclp01\groups\Vangent
> Facilities\FMDesktop\Peoplesoft HR Data\PS_FMDesktop.xls", Fileformat=43
> 'It's a 2003 file .......... Fileformat=xlNormal
> objExcel.ActiveWorkbook.Close
>
> objExcel.Quit
> Set objExcel = Nothing
>
> Any more ideas?
>
> Also, where can I find the
>


Your not actually saving anything, you have the SaveAS line commented
out. If your using excel 2003, the SaveAS code is 43. If it's 2007,
then it's 56. Just change this line:

'objExcel.ActiveWorkbook.SaveAS "\\Vadenmclp01\groups\Vangent
Facilities\FMDesktop\Peoplesoft HR Data\PS_FMDesktop.xls",
Fileformat=43
'It's a 2003 file .......... Fileformat=xlNormal

WITH THIS:

objExcel.ActiveWorkbook.SaveAS "\\Vadenmclp01\groups\Vangent
Facilities\FMDesktop\Peoplesoft HR Data\PS_FMDesktop.xls", 43

From: ekrengel on
On Jan 12, 9:05 am, "SAC" <s...(a)somewhere.com> wrote:
> There is another file type that I think I need.
>
> I'm using MS Excel 2003 and when I do a file save as with it, file type 43
> shows it as:
>
> "Microsoft Excel 97 - Excel 2003....."
>
> I need the one that just reads "Microsoft Office Excel Workbook"
>
> Which number would that one be?
>
> Thanks again!
>
> "ekrengel" <erickreng...(a)gmail.com> wrote in message
>
> news:75239645-08a6-494d-ad7f-3dbb70d793bc(a)34g2000yqp.googlegroups.com...
> On Jan 11, 8:31 pm, "SAC" <s...(a)somewhere.com> wrote:
>
>
>
> > I need to run this unattended within a stored procedure on a sql server so
> > I
> > can't have the messages, etc.
>
> > Here's what I have now, but it didn't change the file...
>
> > Set objFSO = CreateObject("Scripting.FileSystemObject")
>
> > 'Delete Backup File first
> > objFSO.DeleteFile("\\Vadenmclp01\groups\Vangent
> > Facilities\FMDesktop\Peoplesoft HR Data\PS_FMDesktop1.xls")
>
> > 'Copy to a Backup File
> > 'objFSO.MoveFile "\\Vadenmclp01\groups\Vangent
> > Facilities\FMDesktop\Peoplesoft HR Data\PS_FMDesktop.xls" ,
> > "\\Vadenmclp01\groups\Vangent Facilities\FMDesktop\Peoplesoft HR
> > Data\PS_FMDesktop1.xls"
>
> > objFSO.CopyFile "\\Vadenmclp01\groups\Vangent
> > Facilities\FMDesktop\Peoplesoft HR Data\PS_FMDesktop.xls" ,
> > "\\Vadenmclp01\groups\Vangent Facilities\FMDesktop\Peoplesoft HR
> > Data\PS_FMDesktop1.xls", OverwriteExisting
>
> > Set objExcel = CreateObject("Excel.Application")
> > Set objWorkbook = objExcel.Workbooks.Open("\\Vadenmclp01\groups\Vangent
> > Facilities\FMDesktop\Peoplesoft HR Data\PS_FMDesktop.xls")
>
> > objExcel.Application.Visible = False
>
> > objExcel.Application.DisplayAlerts = False
>
> > 'objExcel.ActiveWorkbook.SaveAS "\\Vadenmclp01\groups\Vangent
> > Facilities\FMDesktop\Peoplesoft HR Data\PS_FMDesktop.xls", Fileformat=43
> > 'It's a 2003 file .......... Fileformat=xlNormal
> > objExcel.ActiveWorkbook.Close
>
> > objExcel.Quit
> > Set objExcel = Nothing
>
> > Any more ideas?
>
> > Also, where can I find the
>
> Your not actually saving anything, you have the SaveAS line commented
> out.  If your using excel 2003, the SaveAS code is 43.  If it's 2007,
> then it's 56.  Just change this line:
>
> 'objExcel.ActiveWorkbook.SaveAS "\\Vadenmclp01\groups\Vangent
> Facilities\FMDesktop\Peoplesoft HR Data\PS_FMDesktop.xls",
> Fileformat=43
> 'It's a 2003 file .......... Fileformat=xlNormal
>
> WITH THIS:
>
> objExcel.ActiveWorkbook.SaveAS "\\Vadenmclp01\groups\Vangent
> Facilities\FMDesktop\Peoplesoft HR Data\PS_FMDesktop.xls", 43

A couple good references...

For Excel 2003:
http://blogs.technet.com/heyscriptingguy/archive/2006/03/07/how-can-i-save-an-excel-spreadsheet-and-then-save-a-copy-as-html.aspx
For Excel 2007-2010: http://www.rondebruin.nl/saveas.htm

Hope this helps...
From: SAC on
Do you know what is the number for saving it as a Microsoft Office Excel
Workbook? Or do you know where I can find the number for the parameter?
I'm using Excel 2003.

I don't know where to find this number. xlNormal does not work. Leaving no
parameter does not work.

Thanks.

"ekrengel" <erickrengel5(a)gmail.com> wrote in message
news:7bfc7d1b-9a02-4877-bea8-6607aaaac8aa(a)w12g2000vbj.googlegroups.com...
On Jan 12, 9:05 am, "SAC" <s...(a)somewhere.com> wrote:
> There is another file type that I think I need.
>
> I'm using MS Excel 2003 and when I do a file save as with it, file type 43
> shows it as:
>
> "Microsoft Excel 97 - Excel 2003....."
>
> I need the one that just reads "Microsoft Office Excel Workbook"
>
> Which number would that one be?
>
> Thanks again!
>
> "ekrengel" <erickreng...(a)gmail.com> wrote in message
>
> news:75239645-08a6-494d-ad7f-3dbb70d793bc(a)34g2000yqp.googlegroups.com...
> On Jan 11, 8:31 pm, "SAC" <s...(a)somewhere.com> wrote:
>
>
>
> > I need to run this unattended within a stored procedure on a sql server
> > so
> > I
> > can't have the messages, etc.
>
> > Here's what I have now, but it didn't change the file...
>
> > Set objFSO = CreateObject("Scripting.FileSystemObject")
>
> > 'Delete Backup File first
> > objFSO.DeleteFile("\\Vadenmclp01\groups\Vangent
> > Facilities\FMDesktop\Peoplesoft HR Data\PS_FMDesktop1.xls")
>
> > 'Copy to a Backup File
> > 'objFSO.MoveFile "\\Vadenmclp01\groups\Vangent
> > Facilities\FMDesktop\Peoplesoft HR Data\PS_FMDesktop.xls" ,
> > "\\Vadenmclp01\groups\Vangent Facilities\FMDesktop\Peoplesoft HR
> > Data\PS_FMDesktop1.xls"
>
> > objFSO.CopyFile "\\Vadenmclp01\groups\Vangent
> > Facilities\FMDesktop\Peoplesoft HR Data\PS_FMDesktop.xls" ,
> > "\\Vadenmclp01\groups\Vangent Facilities\FMDesktop\Peoplesoft HR
> > Data\PS_FMDesktop1.xls", OverwriteExisting
>
> > Set objExcel = CreateObject("Excel.Application")
> > Set objWorkbook = objExcel.Workbooks.Open("\\Vadenmclp01\groups\Vangent
> > Facilities\FMDesktop\Peoplesoft HR Data\PS_FMDesktop.xls")
>
> > objExcel.Application.Visible = False
>
> > objExcel.Application.DisplayAlerts = False
>
> > 'objExcel.ActiveWorkbook.SaveAS "\\Vadenmclp01\groups\Vangent
> > Facilities\FMDesktop\Peoplesoft HR Data\PS_FMDesktop.xls", Fileformat=43
> > 'It's a 2003 file .......... Fileformat=xlNormal
> > objExcel.ActiveWorkbook.Close
>
> > objExcel.Quit
> > Set objExcel = Nothing
>
> > Any more ideas?
>
> > Also, where can I find the
>
> Your not actually saving anything, you have the SaveAS line commented
> out. If your using excel 2003, the SaveAS code is 43. If it's 2007,
> then it's 56. Just change this line:
>
> 'objExcel.ActiveWorkbook.SaveAS "\\Vadenmclp01\groups\Vangent
> Facilities\FMDesktop\Peoplesoft HR Data\PS_FMDesktop.xls",
> Fileformat=43
> 'It's a 2003 file .......... Fileformat=xlNormal
>
> WITH THIS:
>
> objExcel.ActiveWorkbook.SaveAS "\\Vadenmclp01\groups\Vangent
> Facilities\FMDesktop\Peoplesoft HR Data\PS_FMDesktop.xls", 43

A couple good references...

For Excel 2003:
http://blogs.technet.com/heyscriptingguy/archive/2006/03/07/how-can-i-save-an-excel-spreadsheet-and-then-save-a-copy-as-html.aspx
For Excel 2007-2010: http://www.rondebruin.nl/saveas.htm

Hope this helps...

From: SAC on
Oh, I see the list...thanks!!! I'll test some of these.

"SAC" <sac(a)somewhere.com> wrote in message
news:eFe7av5kKHA.5020(a)TK2MSFTNGP02.phx.gbl...
> Do you know what is the number for saving it as a Microsoft Office Excel
> Workbook? Or do you know where I can find the number for the parameter?
> I'm using Excel 2003.
>
> I don't know where to find this number. xlNormal does not work. Leaving
> no parameter does not work.
>
> Thanks.
>
> "ekrengel" <erickrengel5(a)gmail.com> wrote in message
> news:7bfc7d1b-9a02-4877-bea8-6607aaaac8aa(a)w12g2000vbj.googlegroups.com...
> On Jan 12, 9:05 am, "SAC" <s...(a)somewhere.com> wrote:
>> There is another file type that I think I need.
>>
>> I'm using MS Excel 2003 and when I do a file save as with it, file type
>> 43
>> shows it as:
>>
>> "Microsoft Excel 97 - Excel 2003....."
>>
>> I need the one that just reads "Microsoft Office Excel Workbook"
>>
>> Which number would that one be?
>>
>> Thanks again!
>>
>> "ekrengel" <erickreng...(a)gmail.com> wrote in message
>>
>> news:75239645-08a6-494d-ad7f-3dbb70d793bc(a)34g2000yqp.googlegroups.com...
>> On Jan 11, 8:31 pm, "SAC" <s...(a)somewhere.com> wrote:
>>
>>
>>
>> > I need to run this unattended within a stored procedure on a sql server
>> > so
>> > I
>> > can't have the messages, etc.
>>
>> > Here's what I have now, but it didn't change the file...
>>
>> > Set objFSO = CreateObject("Scripting.FileSystemObject")
>>
>> > 'Delete Backup File first
>> > objFSO.DeleteFile("\\Vadenmclp01\groups\Vangent
>> > Facilities\FMDesktop\Peoplesoft HR Data\PS_FMDesktop1.xls")
>>
>> > 'Copy to a Backup File
>> > 'objFSO.MoveFile "\\Vadenmclp01\groups\Vangent
>> > Facilities\FMDesktop\Peoplesoft HR Data\PS_FMDesktop.xls" ,
>> > "\\Vadenmclp01\groups\Vangent Facilities\FMDesktop\Peoplesoft HR
>> > Data\PS_FMDesktop1.xls"
>>
>> > objFSO.CopyFile "\\Vadenmclp01\groups\Vangent
>> > Facilities\FMDesktop\Peoplesoft HR Data\PS_FMDesktop.xls" ,
>> > "\\Vadenmclp01\groups\Vangent Facilities\FMDesktop\Peoplesoft HR
>> > Data\PS_FMDesktop1.xls", OverwriteExisting
>>
>> > Set objExcel = CreateObject("Excel.Application")
>> > Set objWorkbook = objExcel.Workbooks.Open("\\Vadenmclp01\groups\Vangent
>> > Facilities\FMDesktop\Peoplesoft HR Data\PS_FMDesktop.xls")
>>
>> > objExcel.Application.Visible = False
>>
>> > objExcel.Application.DisplayAlerts = False
>>
>> > 'objExcel.ActiveWorkbook.SaveAS "\\Vadenmclp01\groups\Vangent
>> > Facilities\FMDesktop\Peoplesoft HR Data\PS_FMDesktop.xls",
>> > Fileformat=43
>> > 'It's a 2003 file .......... Fileformat=xlNormal
>> > objExcel.ActiveWorkbook.Close
>>
>> > objExcel.Quit
>> > Set objExcel = Nothing
>>
>> > Any more ideas?
>>
>> > Also, where can I find the
>>
>> Your not actually saving anything, you have the SaveAS line commented
>> out. If your using excel 2003, the SaveAS code is 43. If it's 2007,
>> then it's 56. Just change this line:
>>
>> 'objExcel.ActiveWorkbook.SaveAS "\\Vadenmclp01\groups\Vangent
>> Facilities\FMDesktop\Peoplesoft HR Data\PS_FMDesktop.xls",
>> Fileformat=43
>> 'It's a 2003 file .......... Fileformat=xlNormal
>>
>> WITH THIS:
>>
>> objExcel.ActiveWorkbook.SaveAS "\\Vadenmclp01\groups\Vangent
>> Facilities\FMDesktop\Peoplesoft HR Data\PS_FMDesktop.xls", 43
>
> A couple good references...
>
> For Excel 2003:
> http://blogs.technet.com/heyscriptingguy/archive/2006/03/07/how-can-i-save-an-excel-spreadsheet-and-then-save-a-copy-as-html.aspx
> For Excel 2007-2010: http://www.rondebruin.nl/saveas.htm
>
> Hope this helps...