add note to body or notes

J

Joel Allen

Outlook 2003 SP1

Hi,

The following script adds a note to existing notes in the notes field.

'-----------------
Sub CommandButtonNewEntry_Click()
On Error Resume Next
Item.Body = Now() & " " & pCurUserName & ": " & vbCrLf & vbCrLf & Item.Body
End Sub
'-----------------

My problem is that all the formatting is lost and turns it to plain text.
Any ideas on how to keep the formatting that exists in the notes field?

Thanks, Joel
 
D

Dmitry Streblechenko

Tasks and appointments store the body in RTF.
You would need to use either Extended MAPI (C++ or Delphi only) or
<plug>Redemption (url below) - set the SafeTaskItem.RtfBody property</plug>

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
 
J

Joel Allen

Redemption seems like the solution to me. If I bought it and installed it
on my computer, will the code still work on other users computers, or do I
need to install redemption on everyone's computer?
 
D

Dmitry Streblechenko

The dll woudl need to be installed on every computer where it is used. As
simple as copying the dll to a local folder and registering it with
regsvr32.exe will work.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
 

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