msoutlook.org Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Adding Contact to shared Contacts with Redemption

 
Post new topic   Reply to topic    msoutlook.org Forum Index -> MS Office Outlook
Author Message
bluesbrthr



Joined: 13 Aug 2007
Posts: 10

PostPosted: Wed Feb 27, 2008 3:35 pm    Post subject: Adding Contact to shared Contacts with Redemption Reply with quote

We have a program that collects all the new e-mail addresses an
employee receives and sends to that aren't in his Outlook Contacts.
The user's assistant opens a VB application from her desk, reviews the
e-mails, and adds them to the Contacts using the program.

The code opens a new contact form an inserts the e-mail address. It
is left open and not saved, so the user can enter any other info.

So I have code that works without a problem... once I remove the
"myRecipient.Resolve" line of code. When this is in there, I get the
pop-up message that wants me to allow access to Outlook.

Do I need that line of code and if so, how can I get past it?

I have Outlook Redemption, but for the life of me I can't figure out
how to re-code it to use Redemption.


My code:

Dim MyOutlook As outlook.Application
Dim myNameSpace As NameSpace
Dim myFolder As MAPIFolder
Dim myContactItem As outlook.ContactItem
Dim myRecipient As outlook.Recipient
Dim rsNewContacts As DAO.Recordset

Set MyOutlook = CreateObject("Outlook.Application." &
Val(Left(outlook.Version, 2)))
Set myNameSpace = MyOutlook.GetNamespace("MAPI")

Set myRecipient = myNameSpace.CreateRecipient("Don Beaty")
'myRecipient.resolve

Set myFolder = myNameSpace.GetSharedDefaultFolder(myRecipient,
olFolderContacts)
Set myContactItem = myFolder.Items.Add

myContactItem.Email1Address = Me.grdNewContacts.Columns("Email")
myContactItem.Display

Set myContactItem = Nothing
Set myFolder = Nothing
Set myNameSpace = Nothing
Set MyOutlook = Nothing

Archived from group: microsoft>public>office>developer>outlook>vba
Back to top
View user's profile Send private message
Display posts from previous:   
Related Topics:
Redemption and Send() Hi When outlook is set to work offline and I call the Send() method of the SafeMailItem of the Redemption tools then the mails are moved to the draft folder and not to the Outbox. Although the mails are going to be sent as soon as go online and click the

Outlook Redemption not working .... Hello all, I am trying to make a program using vba which sends emails without intervenience of the user. It works fine except the Outlook always displays two warnings with each email it is going to send : 1) That a "program tries to get access to the ema

Redemption MAPITable Question Well, this seems like it should be simple. So, I assume I'm overlooking something small. Here's my code: Public Sub Dim oRecordset As Object Dim oTable As Object Set oTable = oTable.item = Outlook.Sess

Use redemption to get SMTP of sender Hi All, I'm using redemption to try to get the SMTP address from the sender of an email. I do get the sender email address and the recipients SMTP but not that of the sender. What do I need to use? MArco

Hiding attachments with Redemption Hi I try to send a mail with embedded images with redemption and outlook. But I can't set the right field of IMessage. It says that the value isn't corrent. I think this is because the field dopesn't exists. Calling causes in a exception "
Post new topic   Reply to topic    msoutlook.org Forum Index -> MS Office Outlook All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group