1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Date Macro for Outlook 2003 help

Discussion in 'Business Applications' started by jibjob79, Jan 29, 2010.

Thread Status:
Not open for further replies.
  1. jibjob79

    jibjob79 Thread Starter

    Joined:
    Jan 29, 2010
    Messages:
    1
    Hello,
    First off what a knowledgeable and useful site you have. I have been trying to sort out several IT issues now that I have become my organisations IT guy i.e. I can fix a few software and hardware issue without calling in tech support. However my Outlook Macro skills have been found wanting so by searching this site I found this old closed thread

    http://forums.techguy.org/business-applications/867198-date-macro-outlook-2003-a.html

    which is exactly what I was looking for, (y)to Rollin_Again for his great advice, on how to get the date inserted automatically into outlook 2003 subject line when I open an email using the date time group of yyyyMMdd. I'm using his recommended code:

    Sub CreateMail()

    Dim objOutlookMsg As Outlook.MailItem
    Set objOutlookMsg = Application.CreateItem(olMailItem)
    objOutlookMsg.Subject = Year(Date) & Month(Date) & Day(Date) & " -
    TEST SUBJECT"
    objOutlookMsg.Display

    End Sub


    And I have the macro set up and working.

    The only problem is that instead of displaying the date time group as yyyyMMdd so that for 1 Feb 2010 it would read 20100201 it will display it without the month and date with a preceding zero such as 201021. I've searched this site and goggled for the last 4 days to try and sort the issue out myself but no luck hence the post here. I have changed my regional settings in the control panel trying out other date formats and customising my own, they replicate through to word and excel but I just can't seem to affect the date format in outlook 2003:confused:.

    I've tried researching macros in outlook that would allow me to change the date time group format or even insert a formula that would check if Month(date) is any value between 1 to 9 or a single digit then prefix "0" in front of month(date) That way it would display correctly and I could replicate it for day(date) as well. Currently I’m manually prefixing month(date) with "0" for the first 9 months of the year and day(date) with "0" for the first 9 days of the month however I want to be able to set this up for other IT illiterate people and the simpler the better is best.

    Hopefully someone will be able to save my sanity and show me a simple work around to cure my IT blues.

    VMT in advance.

    Jibjob79
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/898504

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice