Solved

Need help with Subject line in VBS script for Email

Posted on 2011-03-24
2
417 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

This is an addendum to the following article: Acitve Directory based Outlook Signature (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_24950055.html) The script is fine, and works in normal client-server domains…
With User Account Control (UAC) enabled in Windows 7, one needs to open an elevated Command Prompt in order to run scripts under administrative privileges. Although the elevated Command Prompt accomplishes the task, the question How to run as script…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

730 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