View Single Post
  #3  
Old July 20th 09, 01:48 PM posted to microsoft.public.office.developer.outlook.vba,microsoft.public.outlook,microsoft.public.outlook.program_vba
F.H. van Zelm
external usenet poster
 
Posts: 14
Default Insert date at cursor location

Hi Sue,

Outlook 2003, 'stand alone', not server * client

My former code worked on any type of item: contact, appointment, mail.
It would insert the current date at the cursor.

Annoyance with my 'new' code is also that it gives the security warning
whereas my former code worked without.

Kind regards, Frans


"Sue Mosher [MVP]" schreef in bericht
...
In what kind of item? In what version of Outlook?

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"F.H. van Zelm" wrote in message
...
Hi,

Once, I had a macro to inert the current date anywhere in the notes field
of an open item.
That macro has ... gone with the wind.

I recreated:
=====================================
Sub DateInsert()
Dim myOlApp As New Outlook.Application
Dim myItem As Object
Set myItem = myOlApp.ActiveInspector.CurrentItem
myItem.Body = Date & vbCr & myItem.Body
Set myItem = Nothing
Set myOlApp = Nothing
End Sub

=====================================
It works but, of course, inserts the date on top of any text.

What to write to make the time stamp appear at the cursor?

Many thanks, Frans
www.fhvzelm.com





Ads