![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
In the help they say to paste this code (under the ----) into a class module
Now that it is done: What is the name of the class i just create? Myolitems? How can i declare or call it from a regular module MS say in the help that the code won't work unitl you initialise_handler How can i do that? I try Dim oi as myOlitems and oi.initialise_handler from a regular module but it is not working. Can someone help Me? Regards, pierre ----------------------------------------------------------------------- Dim myOlApp As Outlook.Application Public WithEvents myOlItems As Outlook.Items Public Sub Initialize_handler() Set myOlItems = myOlApp.GetNamespace("MAPI").GetDefaultFolder(olFo lderContacts).Items End Sub Private Sub myOlItems_ItemAdd(ByVal Item As Object) Dim myOlMItem As Outlook.MailItem Dim myOlAtts As Outlook.Attachments Set myOlMItem = myOlApp.CreateItem(olMailItem) myOlMItem.Save Set myOlAtts = myOlMItem.Attachments ' Add new contact to attachments in mail message myOlAtts.Add Item, olByValue myOlMItem.To = "Sales Team" myOlMItem.Subject = "New contact" myOlMItem.Send End Sub .. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
can I color code tasks with a category or otherwise make subcatego | Arthur | Outlook - Using Contacts | 1 | April 24th 06 12:37 AM |
new internet carrier & I can't make outlook work | Quinton567 | Outlook - General Queries | 4 | February 8th 06 12:57 AM |
How Do I make all this work? | bnichols9 | Outlook - General Queries | 1 | February 7th 06 01:48 AM |
Saving as a Template means code doesn't work | Michael Anderson | Outlook - Using Forms | 1 | January 19th 06 05:22 PM |
How to Make Distribution Lists Work Properly | Bernie | Outlook and VBA | 0 | January 10th 06 07:34 PM |