Microsoft Office Forums Outlook 2003-formatting vba Date stamp

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-29-2012, 10:39 AM
Royzer Royzer is offline Outlook 2003-formatting vba Date stamp Windows XP Outlook 2003-formatting vba Date stamp Office 2007
Novice
Outlook 2003-formatting vba Date stamp
 
Join Date: Mar 2012
Location: Tallahassee, FL
Posts: 2
Royzer is on a distinguished road
Default Outlook 2003-formatting vba Date stamp

Hi.

Is there something I can add to my Outlook code to reformat the Date from mm/dd/yyyy to a date format that uses the month name instead of number? Also, is there any way to place the date in a specific part of the email body? Right now it appears at the bottom left of the email body. Thanks!

Here's what I'm using:


Code:
 Sub StampDateHTML()
    Dim objOL As Outlook.Application
    Dim objNS As Outlook.NameSpace
    Dim objItem As Object
    Dim strStamp As String
    On Error Resume Next
    Set objOL = Application
    Set objItem = objOL.ActiveInspector.CurrentItem
    If Not objItem Is Nothing Then
        If objItem.BodyFormat = olFormatHTML Then
            Set objNS = objOL.Session
            strStamp = "<p>" & Date
            objItem.HTMLBody = Replace(objItem.HTMLBody, _
                               "</body>", _
                               strStamp & "</body>", _
                               , , vbTextCompare)
        End If
    End If
    Set objOL = Nothing
    Set objNS = Nothing
    Set objItem = Nothing
End Sub
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Outlook 2003-formatting vba Date stamp Date formatting kjxavier Excel 18 08-23-2011 08:21 AM
Outlook 2003-formatting vba Date stamp Date formatting kjxavier Excel 6 08-12-2011 05:46 AM
Date formatting kjxavier Excel 0 08-10-2011 08:17 AM
Outlook 2003-formatting vba Date stamp Date Formatting in MS word 2007 Karthick Word 4 01-19-2010 05:54 AM
Add date and time stamp to new mail and incoming mail cadsmarter Outlook 0 02-02-2006 08:50 AM


All times are GMT -7. The time now is 10:26 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2019 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft