Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

RunApp to Excel Template

Status
Not open for further replies.

wvmbark

Technical User
Feb 12, 2003
135
US
If I open an Excel Template, it opens as an .xls file. And when I click "Save", a "Save As" box appears and I can save the new .xls file.

In Access, I've create a macro to open the template using RunApp with the following in the command line:

"C:\Program Files\Microsoft Office\Office10\Excel.exe" "S:\ACMX and Engineering\AC Maint\Tech Support\\Target List\Target Selection Template.xlt"

The file opens but it opens as a .xlt. So if I click "Save", it overwrites the .xlt file.

Is there a way to open the Excel file via the macro so that it opens to a new .xls file using the template like in the first scenario above.

Thanks!!
 
I've moved this question to Microsoft Office forum. I apologize for any confusion.
 
Since I haven't received a response in the Office forum, I tought I'd bring this back up one last time. Any help would be greatly appreciated.

Thank you!!
 
I think you are going to have to use VBA to Add the template to the workbooks so that it creates a new instance of it:

Code:
    Dim msExcel As Excel.Application
    Set msExcel = GetObject(Class:="Excel.Application")
    'msExcel.Visible = True 'If you want to see whats going on for testing
    msExcel.Visible = False
    msExcel.Workbooks.Add "S:\ACMX and Engineering\AC Maint\Tech Support\\Target List\Target Selection Template.xlt"


Leslie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top