adding a distlist item to the links collection

M

Michael Kensy

Hola,

I just try to figure out how to add DistListItems to the items links
collection. The following code fragement

***
Dim objRDOMailItem As Redemption.RDOMail
Dim EID As String, StID As String
If IsNothing(gobjRDOSession) Then Set gobjRDOSession = funcGetRDOSession()

EID = objItem.EntryID1
StID = objItem.Parent.StoreID

Set objRDOMailItem = gobjRDOSession.GetMessageFromID(objItem.EntryID,
objItem.Parent.StoreID)
objRDOMailItem.Links.Add colFoundItems.Item(i)
objRDOMailItem.Save
Set objRDOMailItem = Nothing
***

is doing that job already.

My problem is the items form doesn't contain those DLItem immediately
although the DL name is shown at the folders table view same time.
Either opening those item which just got added the DLItem nor getting into
the options dialog will show that link. Trying to close that item (without
any change) will pop up a change request (like "Do you wanna save changes")
....
Because of that change request I tried to shuttdown OL and restart and up
to now thats the only way to get those DLItems name shown at the links
collection.
Does anybody know why those DLItem link will not be shown at the items form
immediately and what I should do?
 
D

Dmitry Streblechenko

Do you mean you are using RDOMail.Links to add a new link to teh item being
displayed by Outlook?
Outlook cannot see changes made with MAPI until teh item being displayed is
closed andf dereferenced.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
M

Michael Kensy

Hi Dmitry,

Am Fri, 30 Nov 2007 15:22:35 -0800 schrieb Dmitry Streblechenko:
Do you mean you are using RDOMail.Links to add a new link to teh item being
displayed by Outlook?


to prevent from missunderstanding ... from my point of view the item isn't
displayed by outlook at time I'm running this code. Up to now I select a
row in a folders table view (but in the end my code should be able to run
from everywhere) before pushing a button to trigger that code.

Outlook cannot see changes made with MAPI until teh item being displayed is
closed andf dereferenced.


For my understanding in this scenario the item is closed when a link is
added via RDOMail or do you mean even than my code needs to dereference
that item as I work on that before?
Another idea is may be this problem is caused by working offline means I
can't connect to the exchange server at time.
 
D

Dmitry Streblechenko

As soon as you touch any item (objItem?) via the Outlook Object Model,
Outlook will cache it until the item is completely dereferenced.
How/when/if do you release objItem?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
M

Michael Kensy

Hola Dmitry,

Am Mon, 3 Dec 2007 10:18:06 -0800 schrieb Dmitry Streblechenko:
As soon as you touch any item (objItem?) via the Outlook Object Model,
Outlook will cache it until the item is completely dereferenced.
How/when/if do you release objItem?


;-) ... bad news. I think in this case I need to redo my coding as
'objItem' has been transferred into this procedure as one of several
parameters (means it exists as local param only).
Do I understand right I need to dereference objItem where I did initialize
this parameter first?
 
D

Dmitry Streblechenko

Yes.
Or, since adding links is not blocked, you can use the original OOM object
to call Links.Add

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
M

Michael Kensy

Hi Michael,

Am Wed, 5 Dec 2007 06:44:40 +0100 schrieb Michael Bauer [MVP - Outlook]:
Michael, this could be the point for you to say, hey I got that advice
already and actually know what to do...


do you refer to our correspondence at outlook.de? If so I have to tell you
adding a dummy contact isn't a reliable solution as it works sometimes
only. As you told me support regarding redemption is available here I
posted this topic. Is there anything wrong with that?
More than that I think people like you provide great support not only to
achieve what someone is currently looking for but also do it right. I think
I should not only try to get it working anyway, am I wrong?
 
M

Michael Kensy

Am Wed, 5 Dec 2007 00:29:21 -0800 schrieb Dmitry Streblechenko:
Or, since adding links is not blocked,


thats right but it isn't possible to add distlists. Only because of this I
finally decided your library ;-) ... as I haven't been brave enough
before.
 
D

Dmitry Streblechenko

Then your only solution is to make sure your do not hold any references to
the item to force Outlook to reopen it next time.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
M

Michael Bauer [MVP - Outlook]

There's nothing wrong to ask other people as well. And you could speed up
things if you don't start the discussion from scratch.

As I remember the code you used in our discussion, the object references
were local ones (procedure level). Reading this thread now I don't wonder
that what you called dereferencing didn't work.

--
Best regards
Michael Bauer - MVP Outlook
Synchronize Outlook Categories:
<http://www.vboffice.net/product.html?id=2006063&cmd=detail&lang=en&pub=6>

Am Wed, 5 Dec 2007 20:05:52 +0800 schrieb Michael Kensy:
Hi Michael,

Am Wed, 5 Dec 2007 06:44:40 +0100 schrieb Michael Bauer [MVP - Outlook]:
Michael, this could be the point for you to say, hey I got that advice
already and actually know what to do...


do you refer to our correspondence at outlook.de? If so I have to tell you
adding a dummy contact isn't a reliable solution as it works sometimes
only. As you told me support regarding redemption is available here I
posted this topic. Is there anything wrong with that?
More than that I think people like you provide great support not only to
achieve what someone is currently looking for but also do it right. I think
I should not only try to get it working anyway, am I wrong?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top