ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   comand line (https://www.excelbanter.com/excel-programming/374827-comand-line.html)

Chris

comand line
 
Hello ,

I am looking for a command line I can run in a batch file or a VB script
that I can open a excel file (name_todays Date.XLS) add to it , Print
Portrait, fit to one page wide, Legal, and to print gridlines, then same the
settings then close out of excel.


Any help would be so appreciated.

Chris


Tom Ogilvy

comand line
 
you would have to open a workbook that has code in the workbook open event
to do all that.

then the command would be

Excel.Exe "C:\Myfolder\Trigger.xls"

as an example.

--
Regards,
Tom Ogilvy


"Chris" wrote in message
...
Hello ,

I am looking for a command line I can run in a batch file or a VB script
that I can open a excel file (name_todays Date.XLS) add to it , Print
Portrait, fit to one page wide, Legal, and to print gridlines, then same
the
settings then close out of excel.


Any help would be so appreciated.

Chris




Tom Ogilvy

comand line
 
for VBscript, you need to look at Automation

http://support.microsoft.com/?id=167223
OFF97: Microsoft Office 97 Automation Help File Available (Q167223)

http://support.microsoft.com/?id=260410
OFF2000: Microsoft Office 2000 Automation Help File Available (Q260410)

--
Regards,
Tom Ogilvy



"Chris" wrote in message
...
Hello ,

I am looking for a command line I can run in a batch file or a VB script
that I can open a excel file (name_todays Date.XLS) add to it , Print
Portrait, fit to one page wide, Legal, and to print gridlines, then same
the
settings then close out of excel.


Any help would be so appreciated.

Chris





All times are GMT +1. The time now is 04:44 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com