PC Review
Forums
Newsgroups
Microsoft Outlook
Microsoft Outlook Form Programming
Problems with Recipient.Add and Macro Signing ???
Forums
Newsgroups
Microsoft Outlook
Microsoft Outlook Form Programming
Problems with Recipient.Add and Macro Signing ???
![]() |
Problems with Recipient.Add and Macro Signing ??? |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
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 |
|
|
|
#2 |
|
Guest
Posts: n/a
|
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 > |
|
|
|
#3 |
|
Guest
Posts: n/a
|
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 > > |
|
|
|
#4 |
|
Guest
Posts: n/a
|
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? |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

