Group:  Microsoft Outlook ยป microsoft.public.outlook.program_addins
Thread: ResolveAll doesn't underline in the mail's "To"

Geek News

ResolveAll doesn't underline in the mail's "To"
Klemens <klemid[ at ]gmail.com> 6/22/2007 12:04:19 AM
I'm using redemption to assemble a new mail with a list of recipients
from a different source. My code looks like this,,,

oSaveMail.Item = moMailItem
Set oRecipient = oApptItem.Recipients(i)
' ignore resources etc
Set oSaveRecp = oSaveMail.Recipients.AddEx(strRecipient, , , olTo)
oSaveRecp.Resolve False
strRecipient = oRecipient.Address
'set mail "To" and resolve
oSaveMail.To = strRecipients
oSaveMail.Recipients.ResolveAll
'moMailItem.Recipients.ResolveAll

As a result the recipients in the "To" field are not underlined. But I
want the m to be. When I use the last line instead, it becomes
underlined but shows a security popup.

Any idea?

- Klemens

Re: ResolveAll doesn't underline in the mail's "To"
"Dmitry Streblechenko" <dmitry[ at ]dimastr.com> 6/22/2007 5:01:49 PM
Outlook cannot see changes made by MAPI until the item is completely
dereferenced and reopened.
Do you modify recipients of a message that is already being displayed or you
call Display after you add and resolve the recipients?

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

"Klemens" <klemid[ at ]gmail.com> wrote in message
news:1182470659.502080.280990[ at ]n2g2000hse.googlegroups.com...
[Quoted Text]
> I'm using redemption to assemble a new mail with a list of recipients
> from a different source. My code looks like this,,,
>
> oSaveMail.Item = moMailItem
> Set oRecipient = oApptItem.Recipients(i)
> ' ignore resources etc
> Set oSaveRecp = oSaveMail.Recipients.AddEx(strRecipient, , , olTo)
> oSaveRecp.Resolve False
> strRecipient = oRecipient.Address
> 'set mail "To" and resolve
> oSaveMail.To = strRecipients
> oSaveMail.Recipients.ResolveAll
> 'moMailItem.Recipients.ResolveAll
>
> As a result the recipients in the "To" field are not underlined. But I
> want the m to be. When I use the last line instead, it becomes
> underlined but shows a security popup.
>
> Any idea?
>
> - Klemens
>


Re: ResolveAll doesn't underline in the mail's "To"
Klemens <klemid[ at ]gmail.com> 6/22/2007 5:49:45 PM
This form is opened from the Outlook menu and I intercept the
NewInspector event and populate the form and the reciepients there. I
suspect this is "too late". First I was wondering why it work incase I
call ResolveAll on the Outlook item. But now it is obvious.

On 22 Jun., 19:01, "Dmitry Streblechenko" <dmi...[ at ]dimastr.com> wrote:
[Quoted Text]
> Outlook cannot see changes made by MAPI until the item is completely
> dereferenced and reopened.
> Do you modify recipients of a message that is already being displayed or you
> call Display after you add and resolve the recipients?
>
> Dmitry Streblechenko (MVP)http://www.dimastr.com/
> OutlookSpy - Outlook, CDO
> and MAPI Developer Tool
>
> "Klemens" <kle...[ at ]gmail.com> wrote in message
>
> news:1182470659.502080.280990[ at ]n2g2000hse.googlegroups.com...
>
>
>
> > I'm using redemption to assemble a new mail with a list of recipients
> > from a different source. My code looks like this,,,
>
> > oSaveMail.Item = moMailItem
> > Set oRecipient = oApptItem.Recipients(i)
> > ' ignore resources etc
> > Set oSaveRecp = oSaveMail.Recipients.AddEx(strRecipient, , , olTo)
> > oSaveRecp.Resolve False
> > strRecipient = oRecipient.Address
> > 'set mail "To" and resolve
> > oSaveMail.To = strRecipients
> > oSaveMail.Recipients.ResolveAll
> > 'moMailItem.Recipients.ResolveAll
>
> > As a result the recipients in the "To" field are not underlined. But I
> > want the m to be. When I use the last line instead, it becomes
> > underlined but shows a security popup.
>
> > Any idea?
>
> > - Klemens- Zitierten Text ausblenden -
>
> - Zitierten Text anzeigen -


Re: ResolveAll doesn't underline in the mail's "To"
"Dmitry Streblechenko" <dmitry[ at ]dimastr.com> 6/22/2007 6:40:03 PM
In most cases adding and deleting a user property forces Outlook to refresh
the recipients list, I don't know if that will work in the NewInspector
event:

Prop = moMailItem.UserProperties.Add("test", olText);

Prop.Value = "test";

Prop.Delete();


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

"Klemens" <klemid[ at ]gmail.com> wrote in message
news:1182534585.608104.280170[ at ]p77g2000hsh.googlegroups.com...
[Quoted Text]
> This form is opened from the Outlook menu and I intercept the
> NewInspector event and populate the form and the reciepients there. I
> suspect this is "too late". First I was wondering why it work incase I
> call ResolveAll on the Outlook item. But now it is obvious.
>
> On 22 Jun., 19:01, "Dmitry Streblechenko" <dmi...[ at ]dimastr.com> wrote:
>> Outlook cannot see changes made by MAPI until the item is completely
>> dereferenced and reopened.
>> Do you modify recipients of a message that is already being displayed or
>> you
>> call Display after you add and resolve the recipients?
>>
>> Dmitry Streblechenko (MVP)http://www.dimastr.com/
>> OutlookSpy - Outlook, CDO
>> and MAPI Developer Tool
>>
>> "Klemens" <kle...[ at ]gmail.com> wrote in message
>>
>> news:1182470659.502080.280990[ at ]n2g2000hse.googlegroups.com...
>>
>>
>>
>> > I'm using redemption to assemble a new mail with a list of recipients
>> > from a different source. My code looks like this,,,
>>
>> > oSaveMail.Item = moMailItem
>> > Set oRecipient = oApptItem.Recipients(i)
>> > ' ignore resources etc
>> > Set oSaveRecp = oSaveMail.Recipients.AddEx(strRecipient, , , olTo)
>> > oSaveRecp.Resolve False
>> > strRecipient = oRecipient.Address
>> > 'set mail "To" and resolve
>> > oSaveMail.To = strRecipients
>> > oSaveMail.Recipients.ResolveAll
>> > 'moMailItem.Recipients.ResolveAll
>>
>> > As a result the recipients in the "To" field are not underlined. But I
>> > want the m to be. When I use the last line instead, it becomes
>> > underlined but shows a security popup.
>>
>> > Any idea?
>>
>> > - Klemens- Zitierten Text ausblenden -
>>
>> - Zitierten Text anzeigen -
>
>


Re: ResolveAll doesn't underline in the mail's "To"
"Sue Mosher [MVP-Outlook]" <suemvp[ at ]outlookcode.com> 6/22/2007 7:06:44 PM
Apparently getting the Body property can also have the same effect. Weird, yes?

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Dmitry Streblechenko" <dmitry[ at ]dimastr.com> wrote in message news:O8orWxPtHHA.912[ at ]TK2MSFTNGP03.phx.gbl...
[Quoted Text]
> In most cases adding and deleting a user property forces Outlook to refresh
> the recipients list, I don't know if that will work in the NewInspector
> event:
>
> Prop = moMailItem.UserProperties.Add("test", olText);
>
> Prop.Value = "test";
>
> Prop.Delete();
>
>
> Dmitry Streblechenko (MVP)
> http://www.dimastr.com/
> OutlookSpy - Outlook, CDO
> and MAPI Developer Tool
>
> "Klemens" <klemid[ at ]gmail.com> wrote in message
> news:1182534585.608104.280170[ at ]p77g2000hsh.googlegroups.com...
>> This form is opened from the Outlook menu and I intercept the
>> NewInspector event and populate the form and the reciepients there. I
>> suspect this is "too late". First I was wondering why it work incase I
>> call ResolveAll on the Outlook item. But now it is obvious.
>>
>> On 22 Jun., 19:01, "Dmitry Streblechenko" <dmi...[ at ]dimastr.com> wrote:
>>> Outlook cannot see changes made by MAPI until the item is completely
>>> dereferenced and reopened.
>>> Do you modify recipients of a message that is already being displayed or
>>> you
>>> call Display after you add and resolve the recipients?
>>>
>>> Dmitry Streblechenko (MVP)http://www.dimastr.com/
>>> OutlookSpy - Outlook, CDO
>>> and MAPI Developer Tool
>>>
>>> "Klemens" <kle...[ at ]gmail.com> wrote in message
>>>
>>> news:1182470659.502080.280990[ at ]n2g2000hse.googlegroups.com...
>>>
>>>
>>>
>>> > I'm using redemption to assemble a new mail with a list of recipients
>>> > from a different source. My code looks like this,,,
>>>
>>> > oSaveMail.Item = moMailItem
>>> > Set oRecipient = oApptItem.Recipients(i)
>>> > ' ignore resources etc
>>> > Set oSaveRecp = oSaveMail.Recipients.AddEx(strRecipient, , , olTo)
>>> > oSaveRecp.Resolve False
>>> > strRecipient = oRecipient.Address
>>> > 'set mail "To" and resolve
>>> > oSaveMail.To = strRecipients
>>> > oSaveMail.Recipients.ResolveAll
>>> > 'moMailItem.Recipients.ResolveAll
>>>
>>> > As a result the recipients in the "To" field are not underlined. But I
>>> > want the m to be. When I use the last line instead, it becomes
>>> > underlined but shows a security popup.
>>>
>>> > Any idea?
>>>
>>> > - Klemens- Zitierten Text ausblenden -
>>>
>>> - Zitierten Text anzeigen -
>>
>>
>
>
Re: ResolveAll doesn't underline in the mail's "To"
"Dmitry Streblechenko" <dmitry[ at ]dimastr.com> 6/22/2007 7:51:53 PM
Weird is the definition of "Outlook" in most dictionaries :-)

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

"Sue Mosher [MVP-Outlook]" <suemvp[ at ]outlookcode.com> wrote in message
news:OodiFGQtHHA.3640[ at ]TK2MSFTNGP05.phx.gbl...
Apparently getting the Body property can also have the same effect. Weird,
yes?

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Dmitry Streblechenko" <dmitry[ at ]dimastr.com> wrote in message
news:O8orWxPtHHA.912[ at ]TK2MSFTNGP03.phx.gbl...
[Quoted Text]
> In most cases adding and deleting a user property forces Outlook to
> refresh
> the recipients list, I don't know if that will work in the NewInspector
> event:
>
> Prop = moMailItem.UserProperties.Add("test", olText);
>
> Prop.Value = "test";
>
> Prop.Delete();
>
>
> Dmitry Streblechenko (MVP)
> http://www.dimastr.com/
> OutlookSpy - Outlook, CDO
> and MAPI Developer Tool
>
> "Klemens" <klemid[ at ]gmail.com> wrote in message
> news:1182534585.608104.280170[ at ]p77g2000hsh.googlegroups.com...
>> This form is opened from the Outlook menu and I intercept the
>> NewInspector event and populate the form and the reciepients there. I
>> suspect this is "too late". First I was wondering why it work incase I
>> call ResolveAll on the Outlook item. But now it is obvious.
>>
>> On 22 Jun., 19:01, "Dmitry Streblechenko" <dmi...[ at ]dimastr.com> wrote:
>>> Outlook cannot see changes made by MAPI until the item is completely
>>> dereferenced and reopened.
>>> Do you modify recipients of a message that is already being displayed or
>>> you
>>> call Display after you add and resolve the recipients?
>>>
>>> Dmitry Streblechenko (MVP)http://www.dimastr.com/
>>> OutlookSpy - Outlook, CDO
>>> and MAPI Developer Tool
>>>
>>> "Klemens" <kle...[ at ]gmail.com> wrote in message
>>>
>>> news:1182470659.502080.280990[ at ]n2g2000hse.googlegroups.com...
>>>
>>>
>>>
>>> > I'm using redemption to assemble a new mail with a list of recipients
>>> > from a different source. My code looks like this,,,
>>>
>>> > oSaveMail.Item = moMailItem
>>> > Set oRecipient = oApptItem.Recipients(i)
>>> > ' ignore resources etc
>>> > Set oSaveRecp = oSaveMail.Recipients.AddEx(strRecipient, , , olTo)
>>> > oSaveRecp.Resolve False
>>> > strRecipient = oRecipient.Address
>>> > 'set mail "To" and resolve
>>> > oSaveMail.To = strRecipients
>>> > oSaveMail.Recipients.ResolveAll
>>> > 'moMailItem.Recipients.ResolveAll
>>>
>>> > As a result the recipients in the "To" field are not underlined. But I
>>> > want the m to be. When I use the last line instead, it becomes
>>> > underlined but shows a security popup.
>>>
>>> > Any idea?
>>>
>>> > - Klemens- Zitierten Text ausblenden -
>>>
>>> - Zitierten Text anzeigen -
>>
>>
>
>


Re: ResolveAll doesn't underline in the mail's "To"
"Michael Bauer [MVP - Outlook]" <mb[ at ]mvps.org> 6/23/2007 6:16:12 AM


I like 'narrow Outlook', which means narrow or limited horizon in German :)

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

Am Fri, 22 Jun 2007 12:51:53 -0700 schrieb Dmitry Streblechenko:

[Quoted Text]
> Weird is the definition of "Outlook" in most dictionaries :-)
>
> Dmitry Streblechenko (MVP)
> http://www.dimastr.com/
> OutlookSpy - Outlook, CDO
> and MAPI Developer Tool
>
> "Sue Mosher [MVP-Outlook]" <suemvp[ at ]outlookcode.com> wrote in message
> news:OodiFGQtHHA.3640[ at ]TK2MSFTNGP05.phx.gbl...
> Apparently getting the Body property can also have the same effect. Weird,
> yes?

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net