megha
01-27-2012, 11:35 AM
Hello...
I am macro beginner and digging with this macro since last few days. I would really appreciate any help.
The macro is working absolutely fine but the Filename causing issue when it come to delete the old version.
Attached word file has three buttons:
1) First button labeled, “Create” simply create a checklist as version 1 with current date and time as file name and SaveAs the file to “Temp Folder”
2) Second button labeled, “Modify File” perform two jobs:
Ř SaveAs the same checklist from step one as version 2 with current date and time as file name to the same folder as in step 1 (i.e. “Temp Folder”). It works fine.
Ř Delete old file meaning delete version 1 which was created in step one. And this is causing a issue, error message pop up stating “File not found” because for example; if I perform 1st step now the file will SaveAs as “TempJan_27_2012_A.Team_Day01_00_12_PM Rev1” then I perform 2nd step the file will SaveAs as “TempJan_27_2012_A.Team_Day01_05_10_PM Rev2” and looking for “TempJan_27_2012_A.Team_Day01_05_10_PM Rev1” to delete instead of “TempJan_27_2012_A.Team_Day01_00_12_PM Rev1”
3) Third button labeled, “Final Save” (I have not work on it yet) will do the basically same jobs as second button but will SaveAs the file to “Completed folder” and will delete version 2 (which is created in step 2) from “temp folder.”
Can some one please help me? I know if I will keep something else as a file name instead of current date and time it will solve my problem but I can’t keep anything else than the current time and date. Any solution? Any alternate way to meet my goal? A waiting for someone reply!!!
Thank you in advance!!!!!!!!!
I am macro beginner and digging with this macro since last few days. I would really appreciate any help.
The macro is working absolutely fine but the Filename causing issue when it come to delete the old version.
Attached word file has three buttons:
1) First button labeled, “Create” simply create a checklist as version 1 with current date and time as file name and SaveAs the file to “Temp Folder”
2) Second button labeled, “Modify File” perform two jobs:
Ř SaveAs the same checklist from step one as version 2 with current date and time as file name to the same folder as in step 1 (i.e. “Temp Folder”). It works fine.
Ř Delete old file meaning delete version 1 which was created in step one. And this is causing a issue, error message pop up stating “File not found” because for example; if I perform 1st step now the file will SaveAs as “TempJan_27_2012_A.Team_Day01_00_12_PM Rev1” then I perform 2nd step the file will SaveAs as “TempJan_27_2012_A.Team_Day01_05_10_PM Rev2” and looking for “TempJan_27_2012_A.Team_Day01_05_10_PM Rev1” to delete instead of “TempJan_27_2012_A.Team_Day01_00_12_PM Rev1”
3) Third button labeled, “Final Save” (I have not work on it yet) will do the basically same jobs as second button but will SaveAs the file to “Completed folder” and will delete version 2 (which is created in step 2) from “temp folder.”
Can some one please help me? I know if I will keep something else as a file name instead of current date and time it will solve my problem but I can’t keep anything else than the current time and date. Any solution? Any alternate way to meet my goal? A waiting for someone reply!!!
Thank you in advance!!!!!!!!!