Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 14th, 2003, 09:41 AM
C4L C4L is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 1 C4L User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
  #2  
Old October 17th, 2003, 09:07 AM
cleverpig cleverpig is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jul 2003
Posts: 1,152 cleverpig User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via MSN to cleverpig
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

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming > Outlook Com add-in (moving deleted contacts)


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway