|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Outlook Com add-in (moving deleted contacts)
Hi Folks,
I'm developing a COM add-in for use with Outlook 2000 upwards and have hit a couple of stumbling blocks that I'd really appreciate some help on:- 1. As part of a sync process, some contact items are occasionally deleted from a user-defined custom contacts folder (the folder is never the default Outlook contacts folder). When these contacts are deleted, I would like to move them into the "Deleted Items" folder, rather than just kill them outright. I use a simple little loop to identify the "Deleted Items" folder and store it as a MAPI folder reference in an object called: RecycleBin as follows:- (Global Declarations) Global oApp As Outlook.Application Global ns As Outlook.NameSpace Global ns_id_num As Integer Global RecycleBin As Outlook.MAPIFolder Global pfolder As Outlook.MAPIFolder (Extract from routine: GetFolder - namespace correctly referenced previously in another routine) dim f as integer ' Set pfolder = ns.Folders(1) 'Personal Folders For f = 1 To pfolder.Folders.Count If Trim(UCase(pfolder.Folders(f))) = "DELETED ITEMS" Then set RecycleBin = pfolder.Folders(f) End If Next f ' However, in the sync routine (which appears to correctly access the RecycleBin object) when I use the .move method on the given contact, for some reason the contact is moved to the DRAFTS folder and not the "Deleted Items" folder. I'm using Redemption for the ContactItem reference, but I dont think this is affecting things as I've tried the same thing with a regular Outlook.ContactItem object and I get the same result. Is there something special I have to do to move contacts to the "Deleted Items" folder, or do I need to do something completely different? Alternatively, is there some parameter that can be parsed to the .delete method, which instructs Outlook to move the contact to the "Deleted Items" folder, rather than wipe it from the system? 2. I would like to make the user-defined custom folder an address book reference automatically. In Outlook 2002 there are the MapiFolder.ShowAsOutlookAB and MapiFolder.AddressBookName properties, which I'm sure will work fine, but what about Outlook 2000? I know this value can be manually set, (by right-clicking the contact folder, selecting the "Properties" menu option, clicking the "Outlook Address Book" tab and putting a check-mark in the "Show as address book" check-box) but what I really need to do, is configure this automatically. Any and all constructive help, suggestions and ideas gratefully received. Thanks and Regards Hitch ![]() |
|
#2
|
|||
|
|||
|
I have a little knowledge about outlook develop.And i found a website that maybe exists your need.Plz visit "The OutLook Develop techologies ihttp://www.slipstick.com/dev/outtech.htm
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Visual Basic Programming > Outlook Com add-in (moving deleted contacts) |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|