Solved

Need help with Subject line in VBS script for Email

Posted on 2011-03-24
2
410 Views
Last Modified: 2012-05-11
I need a format which will use the current date -8 and the current date -1

Example would be:

MAIL.Subject = "the date is 3/15/2011 3/23/2011"

in a format similar to:

MAIL.Subject = "the date" & Mid(date1,1,InStr(1,date1," "))

not great at VB scripting, any help would be appreciated.
0
Comment
Question by:alexr54
  • 2
2 Comments
 
LVL 2

Accepted Solution

by:
alexr54 earned 0 total points
ID: 35208716
figured it out

ate1 = DateAdd("d",-8,Now())
date3 = DateAdd("d",-1,Now())
MAIL.Subject = "the date" & Mid(date1,1,InStr(1,date1," ")) & Mid(date3,1,InStr(1,date3," "))
0
 
LVL 2

Author Closing Comment

by:alexr54
ID: 35208723
figured it out
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Well hello again!  Glad to see you've made it this far without giving up.  In this, the fourth installment of my popular series, I'm going to cover functions and subroutines, what they are, and why they are useful.  Just in case you stumbled onto th…
Over the years I have built up my own little library of code snippets that I refer to when programming or writing a script.  Many of these have come from the web or adaptations from snippets I find on the Web.  Periodically I add to them when I come…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now