Hi
What have you tried so far? Use the macro recorder in the first instance to capture the basic macro code, then review it and edit as necessary.
Hi
What have you tried so far? Use the macro recorder in the first instance to capture the basic macro code, then review it and edit as necessary.
Richard Buttrey
RIP - d. 06/10/2022
If any of the responses have helped then please consider rating them by clicking the small star icon below the post.
Hi Richard,
When you say grab the dates in a date variable ,should I grab these date in text file from user via console or entered inside text file.
And .txt file will be opened if we enter the name of that file in .bat file.
I meant that you should open the txt file from within an Excel macro and then set the variable that you've already dimensioned to the relevant cell in the txt file you've opened. Once you've done that you can close the txt file.
I do not want to open file in the middle of operation .All these scripts need to be scheduled for some specific time so dates should be mentioned initially not in the middle after the files open .
I need a text file where I can enter dates in the starting and then execute my code.
In that case I don't understand. I was under the impression that the txt file contained a value that you wanted to pass as a parameter in your code. Which is why I couldn't understand your reluctance to get your macro to open the txt file, grab the value in a variable and immediately close the txt file.
You'll need to explain your exact process.
Scenario is like this.
I will run execute.bat
this bat file contains
Date.vbs
Makezip.vbs
mailsend.cmd
Date.vbs opens a file FetchEmails.xlsm and Pass dates to that vb code inside FetchEmails.xlsm
On the basis of these dates mails will fetch from outlook inexcel ,then makezip.vbs makes zip of those fetch mails and mailsend.cmd will send mail to specified address.
What I require is just enter those dates from text file instead of passing it to vbs file.
One more can date be entered in the form of dd/mm/yyyy instead of yyyy/mm/dd.
Hi Richard,
I got this http://stackoverflow.com/questions/2...d-with-cscript.
Can you please check will it be helpful.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks