PC Review Forums Newsgroups Microsoft Outlook Microsoft Outlook Form Programming Problems with Recipient.Add and Macro Signing ???

Reply

Problems with Recipient.Add and Macro Signing ???

 
Thread Tools Rate Thread
Old 19-06-2006, 01:30 PM   #1
asousa
Guest
 
Posts: n/a
Default Problems with Recipient.Add and Macro Signing ???


Hello,

I have created a custom message form in Outlook, where I deleted the
To: and Cc: fields, leaving only the Subject and Main Body, adding a
Image and some text.

I have save the Form in the Personal Form Library.

Afterwards I have created a Macro in Outlook with this code:

Sub DisplayForm()
Set myFolder = Session.GetDefaultFolder(olFolderInbox)
Set myItem = myFolder.Items.Add("IPM.Note.SuppRequest")
myItem.Display
myItem.Recipient.Add ("mail@mail.not")
End Sub

Then I noticed Outlook Macro restrictions were in effect and went on to
search out to Sign the Macro. But at this point the Macro itself was
working. It would display a warning, I would accept it, then the Macro
would show up, filling the To: field in the background and I would be
able to send the Macro.

As I mentioned I went on with my search for a Macro Signing procedure
accessible to my company. Eventually I used OpenSSL under Linux to
create a Root CA (which I will install in all client machines) and a
Client Certificate from which I extracted the P12 certificate.
Following this, I opened Outlook and signed the Macro, then resetting
the security level to "High".

Now the code >>> myItem.Recipient.Add ("mail@mail.not") <<< is
displaying a 438 error ( Object doesn't support this property or method
) when I debug the Macro.

This only happened after I signed it. Before it was working just fine.

Kind of wierd, not?

If anyone could help me, I would be greatly appreciated.

Best Regards,

Alexandre Sousa

  Reply With Quote
Old 19-06-2006, 02:33 PM   #2
Sue Mosher [MVP-Outlook]
Guest
 
Posts: n/a
Default Re: Problems with Recipient.Add and Macro Signing ???

There is no MailItem.Recipient object. It's Recipients:

myItem.Recipients.Add ("mail@mail.not")

You can also simply use:

myItem.To="mail@mail.not"

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"asousa" <alexandre.sousa@gmail.com> wrote in message news:1150720246.472444.312940@f6g2000cwb.googlegroups.com...
> Hello,
>
> I have created a custom message form in Outlook, where I deleted the
> To: and Cc: fields, leaving only the Subject and Main Body, adding a
> Image and some text.
>
> I have save the Form in the Personal Form Library.
>
> Afterwards I have created a Macro in Outlook with this code:
>
> Sub DisplayForm()
> Set myFolder = Session.GetDefaultFolder(olFolderInbox)
> Set myItem = myFolder.Items.Add("IPM.Note.SuppRequest")
> myItem.Display
> myItem.Recipient.Add ("mail@mail.not")
> End Sub
>
> Then I noticed Outlook Macro restrictions were in effect and went on to
> search out to Sign the Macro. But at this point the Macro itself was
> working. It would display a warning, I would accept it, then the Macro
> would show up, filling the To: field in the background and I would be
> able to send the Macro.
>
> As I mentioned I went on with my search for a Macro Signing procedure
> accessible to my company. Eventually I used OpenSSL under Linux to
> create a Root CA (which I will install in all client machines) and a
> Client Certificate from which I extracted the P12 certificate.
> Following this, I opened Outlook and signed the Macro, then resetting
> the security level to "High".
>
> Now the code >>> myItem.Recipient.Add ("mail@mail.not") <<< is
> displaying a 438 error ( Object doesn't support this property or method
> ) when I debug the Macro.
>
> This only happened after I signed it. Before it was working just fine.
>
> Kind of wierd, not?
>
> If anyone could help me, I would be greatly appreciated.
>
> Best Regards,
>
> Alexandre Sousa
>

  Reply With Quote
Old 19-06-2006, 02:52 PM   #3
asousa
Guest
 
Posts: n/a
Default Re: Problems with Recipient.Add and Macro Signing ???

Sue,

Thanks once more. Now I felt really dumb. It's what happens when people
work under stress.
To avoid this happening again, do you have any website containing a
tree of objects and methods regarding the Outlook API?

Best Regards,

Alexandre Sousa

Sue Mosher [MVP-Outlook] wrote:
> There is no MailItem.Recipient object. It's Recipients:
>
> myItem.Recipients.Add ("mail@mail.not")
>
> You can also simply use:
>
> myItem.To="mail@mail.not"
>
> --
> Sue Mosher, Outlook MVP
> Author of Configuring Microsoft Outlook 2003
> http://www.turtleflock.com/olconfig/index.htm
> and Microsoft Outlook Programming - Jumpstart for
> Administrators, Power Users, and Developers
> http://www.outlookcode.com/jumpstart.aspx
>
> "asousa" <alexandre.sousa@gmail.com> wrote in message news:1150720246.472444.312940@f6g2000cwb.googlegroups.com...
> > Hello,
> >
> > I have created a custom message form in Outlook, where I deleted the
> > To: and Cc: fields, leaving only the Subject and Main Body, adding a
> > Image and some text.
> >
> > I have save the Form in the Personal Form Library.
> >
> > Afterwards I have created a Macro in Outlook with this code:
> >
> > Sub DisplayForm()
> > Set myFolder = Session.GetDefaultFolder(olFolderInbox)
> > Set myItem = myFolder.Items.Add("IPM.Note.SuppRequest")
> > myItem.Display
> > myItem.Recipient.Add ("mail@mail.not")
> > End Sub
> >
> > Then I noticed Outlook Macro restrictions were in effect and went on to
> > search out to Sign the Macro. But at this point the Macro itself was
> > working. It would display a warning, I would accept it, then the Macro
> > would show up, filling the To: field in the background and I would be
> > able to send the Macro.
> >
> > As I mentioned I went on with my search for a Macro Signing procedure
> > accessible to my company. Eventually I used OpenSSL under Linux to
> > create a Root CA (which I will install in all client machines) and a
> > Client Certificate from which I extracted the P12 certificate.
> > Following this, I opened Outlook and signed the Macro, then resetting
> > the security level to "High".
> >
> > Now the code >>> myItem.Recipient.Add ("mail@mail.not") <<< is
> > displaying a 438 error ( Object doesn't support this property or method
> > ) when I debug the Macro.
> >
> > This only happened after I signed it. Before it was working just fine.
> >
> > Kind of wierd, not?
> >
> > If anyone could help me, I would be greatly appreciated.
> >
> > Best Regards,
> >
> > Alexandre Sousa
> >


  Reply With Quote
Old 19-06-2006, 03:14 PM   #4
Sue Mosher [MVP-Outlook]
Guest
 
Posts: n/a
Default Re: Problems with Recipient.Add and Macro Signing ???

1) The object browser in Outlook VBA. Press F2.

2) MSDN.

3) References posted at http://www.outlookcode.com/d/outtech.htm

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"asousa" <alexandre.sousa@gmail.com> wrote in message news:1150725157.788969.55370@c74g2000cwc.googlegroups.com...

> To avoid this happening again, do you have any website containing a
> tree of objects and methods regarding the Outlook API?


  Reply With Quote
Reply



Thread Tools
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