Solved

Need help with Subject line in VBS script for Email

Posted on 2011-03-24
2
412 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I met Paul Devereux (@pdevereux) today when I responded to his tweet asking “Anybody know how to automate adding files from disk to a folder in #outlook  ?”.  I replied back and told Paul that using automation, in this case scripting, to add files t…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Edureka is one of the fastest growing and most effective online learning sites.  We are here to help you succeed.

911 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

16 Experts available now in Live!

Get 1:1 Help Now