OL2003 Date Stamp question

L

Lee

I am having a problem with the script for a date stamp macro for Outlook.
Using the one pasted below, but it does not work consistently. Sometimes I
click the button I created and it fires right up. Other times, click yields
nothing but a blinking cursor-no error message. Still other times, I click
to run the script in an outlook notes field, and it deletes all the text
therein....

What am I doing wrong? All I want is a simple way to stamp the date and time
at the top of the notes field in a contact OR task record. Am I asking too
much?

Sub StampContact()
Dim objItem As Object
Dim objNS As NameSpace

Set objNS = Application.GetNamespace("MAPI")
Set objItem = Application.ActiveInspector.CurrentItem
If objItem.Class = olContact Then
objItem.Body = vbCrLf & Now() _
& " - " & objNS.CurrentUser & objItem.Body
End If

Set objItem = Nothing
Set objNS = Nothing
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top