PC Review


Reply
Thread Tools Rate Thread

Append to Notes Field

 
 
=?Utf-8?B?Sm9obiBW?=
Guest
Posts: n/a
 
      16th Jul 2005
For the Contacts in the current view (usually a category), I want a macro
that will 1) ask for a text input from the user; 2) precede the text with the
current date and time; then 3) append it to the Notes field of each Contact.
Or, I'd like info on a good substitute or add-in. Using Outlook2003, fully
updated, and XP Pro.

Any help appreciated.
 
Reply With Quote
 
 
 
 
Michael Bauer
Guest
Posts: n/a
 
      17th Jul 2005
John,

the current viewed items you can get with
Application.ActiveExplorer.Selection. For a simple user input use the
Input function, the current date and time is returned by the Now
function. Then write all these infos into each item“s Body property and
save them.

Samples are availabe e.g. if you select the mentioned function names in
the Object Browser (F2) and press F1 for help.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook



John V wrote:
> For the Contacts in the current view (usually a category), I want a
> macro that will 1) ask for a text input from the user; 2) precede the
> text with the current date and time; then 3) append it to the Notes
> field of each Contact. Or, I'd like info on a good substitute or
> add-in. Using Outlook2003, fully updated, and XP Pro.
>
> Any help appreciated.


 
Reply With Quote
 
John Riddle
Guest
Posts: n/a
 
      18th Jul 2005
Here is a macro that I use here. It displays the notes if a single contact is
selected and also provides a text box to enter a new note for the contact (or
if multiple contacts are selected, adds the same note to all of the selected
contacts. This assumes that your already in the "Contacts" folder.


Sub AddOrReadContactNotes()

Dim myContactExp As Explorer
Set myContactExp = Application.ActiveExplorer
Select Case myContactExp.CurrentFolder.Name
'If you're not holding your contacts in the Contacts folder, you'll need
to change the name below to the name of the folder you're using for contact
items
Case "Contacts"
myUser = Application.Session.CurrentUser.Name
If myContactExp.Selection.Count > 1 Then
strNotes = "Enter contact note..."
myNote = InputBox(strNotes, "Add Note")
ElseIf myContactExp.Selection.Count = 1 Then
Set objItem = myContactExp.Selection(1)
strNotes = objItem.Body
strNotes = strNotes & vbCrLf & "Enter contact note..."
myNote = InputBox(strNotes, "Add/View Notes")
End If
If Not myNote = "" Then
For i = 1 To myContactExp.Selection.Count
Set objItem = myContactExp.Selection(i)
If objItem.Class = olContact Then
myBody = objItem.Body
objItem.Body = Now() & " - " & myUser & " - " & myNote &
vbCrLf & myBody
objItem.Save
End If
Next
End If
Set objItem = Nothing
End Select
Set myContactExp = Nothing

End Sub


"John V" <(E-Mail Removed)> wrote in message
news:30B3A490-6CF8-4DD8-A5C9-(E-Mail Removed)...
For the Contacts in the current view (usually a category), I want a macro
that will 1) ask for a text input from the user; 2) precede the text with the
current date and time; then 3) append it to the Notes field of each Contact.
Or, I'd like info on a good substitute or add-in. Using Outlook2003, fully
updated, and XP Pro.

Any help appreciated.


 
Reply With Quote
 
=?Utf-8?B?Sm9obiBW?=
Guest
Posts: n/a
 
      18th Jul 2005
Perfect John. Just what I wanted. Thanks much.

"John Riddle" wrote:

> Here is a macro that I use here. It displays the notes if a single contact is
> selected and also provides a text box to enter a new note for the contact (or
> if multiple contacts are selected, adds the same note to all of the selected
> contacts. This assumes that your already in the "Contacts" folder.
>
>
> Sub AddOrReadContactNotes()
>
> Dim myContactExp As Explorer
> Set myContactExp = Application.ActiveExplorer
> Select Case myContactExp.CurrentFolder.Name
> 'If you're not holding your contacts in the Contacts folder, you'll need
> to change the name below to the name of the folder you're using for contact
> items
> Case "Contacts"
> myUser = Application.Session.CurrentUser.Name
> If myContactExp.Selection.Count > 1 Then
> strNotes = "Enter contact note..."
> myNote = InputBox(strNotes, "Add Note")
> ElseIf myContactExp.Selection.Count = 1 Then
> Set objItem = myContactExp.Selection(1)
> strNotes = objItem.Body
> strNotes = strNotes & vbCrLf & "Enter contact note..."
> myNote = InputBox(strNotes, "Add/View Notes")
> End If
> If Not myNote = "" Then
> For i = 1 To myContactExp.Selection.Count
> Set objItem = myContactExp.Selection(i)
> If objItem.Class = olContact Then
> myBody = objItem.Body
> objItem.Body = Now() & " - " & myUser & " - " & myNote &
> vbCrLf & myBody
> objItem.Save
> End If
> Next
> End If
> Set objItem = Nothing
> End Select
> Set myContactExp = Nothing
>
> End Sub
>
>
> "John V" <(E-Mail Removed)> wrote in message
> news:30B3A490-6CF8-4DD8-A5C9-(E-Mail Removed)...
> For the Contacts in the current view (usually a category), I want a macro
> that will 1) ask for a text input from the user; 2) precede the text with the
> current date and time; then 3) append it to the Notes field of each Contact.
> Or, I'd like info on a good substitute or add-in. Using Outlook2003, fully
> updated, and XP Pro.
>
> Any help appreciated.
>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Append query - Append to table with Autonumber field Boon Microsoft Access Queries 2 29th Jun 2009 06:23 PM
Query to append a field to a record if another field matches Caleb Microsoft Access Reports 0 21st May 2009 09:59 PM
Query to append a field to a record if another field matches Caleb Microsoft Access Reports 0 21st May 2009 09:59 PM
How can I export Notes field from Contact records in one field? =?Utf-8?B?RGVi?= Microsoft Outlook Contacts 4 28th Aug 2006 08:12 PM
Code Notes field NOT to accept (save) notes that contain no data. =?Utf-8?B?U2Ft?= Microsoft Access Form Coding 1 26th Jul 2005 07:27 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:54 PM.