Unless anyone has a better idea:
<AutoRun.inf>
[autorun]
ShellExecute=Install.bat
</AutoRun.inf>
<Install.bat>
copy NewWS.xls C:\NewWS.xls
</Install.bat>
You can user other DOS elements (like %userprofile% etc) in the batch file,
although I don't see how you can get the Excel folder, but admittedly I know
very little about this bat file stuff.
You could always open the Excel file from the Autorun instead:
<AutoRun.inf>
[autorun]
ShellExecute=NewWS.xls
</AutoRun.inf>
and any code in its Workbook_Open event would run. From here you could get
the:
Application.StartupPath
Application.DefaultFilePath
Then do a .SaveCopyAs and then open the copy, whilst you close this WB.
This may not work depending on the users Excel security setting though.
NickHK
NickHK said: