View Single Post
  #4  
Old February 7th 07, 07:55 PM posted to microsoft.public.outlook.contacts
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Automatically enter the date in the details field (Contacts)

Look at the statement that actually inserts the text:

objItem.Body = FormatDateTime(Now(), 2) & ":" & vbCrLf & vbCrLf & vbCrLf & objItem.Body

See what order it uses to concatenate the different text expressions? Now, change that order by rearranging the expressions.

What do I have to add to place the cursor on the next line so I can start
typing my text right away?


That's not possible without a third-party component or Outlook 2007.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"lion" wrote in message ...
Hi Sue,
Thank you so much for your answer. I already found the code and applied it
in my form. I changed it a little bit:
-------
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 = FormatDateTime(Now(), 2) & ":" & vbCrLf & vbCrLf &
vbCrLf & objItem.Body
End If

Set objItem = Nothing
Set objNS = Nothing
End Sub
-------
The only question I have (at the moment) is:
when I execute this macro, it stamps the date, but the cursor is placed at
the beginning of the same line.
What do I have to add to place the cursor on the next line so I can start
typing my text right away?
"Sue Mosher [MVP-Outlook]" wrote:

Yes, that takes a macro. See http://www.outlookcode.com/d/code/stampdate.htm

"lion" wrote in message ...
I'm using Outlook 2003 as a CRM-program.
Every time I have contacted a client or a prospect, I write down the date
and a few words in the details field.
I want to be able to use a shortcut key to place the (system)date in the
details field automatically. Do I have to create a macro to do that and what
would it look like?
Thanks in advance for your answers.


Ads