13lack13lade Posted September 27, 2013 Share Posted September 27, 2013 (edited) Hey guys so im having some issues.. I use autoit to attach and send an email however i keep getting this error: @@ Debug(62) : $S_Files2Attach = >Error code: 0 ### COM Error ! Number: 80020009 ScriptLine: 193 Description:The process cannot access the file because it is being used by another process. >Exit code: 0 Time: 1.813 i am trying to send a normal .xls and it shouldnt be open as in my VBA code it closes the workbook before even running the script to check and email out the file and i use this exact same script im using to email other .xls files and it works fine... When i try and manually open the file im trying to attach i get 'the file you are trying to open is in a different format than specified by the file extension' 'verify that it is not corrupted' do you want to open? i click yes, file is 100% fine..... and not only that my VBA macro will manipulate that spreadsheet with no problems without having opened it before in that extension(so the warning would still pop up, theoretically) So is it that this warning stopping the file straight away that is causing it? and if so is there a way around? i dont really understand why it would make a difference as its attaching the file not opening it but then again im not too sure.. Have closed excel completely, run script to attach and send - still falls over, email still sends just doesnt attach the .xls Any help would be great! Edited September 27, 2013 by 13lack13lade Link to comment Share on other sites More sharing options...
water Posted September 27, 2013 Share Posted September 27, 2013 If you have closed Excel and your script still fails then some other application seems to lock the file. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now