none
Recipients.add throwing error after upgrade RRS feed

  • Question

  •   We have migrated to Windows 10 and Office 2016 and the recipients.add line in my OLE call in PowerBuilder stopped working.  Lots of new security included with upgrades including group policy settings.  Just looking for pointers of where to start looking...

    Tuesday, May 1, 2018 2:27 PM

All replies

  • What do you mean by "stopped working"? Does it raise an exception? Hang? Do nothing?

    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    Tuesday, May 1, 2018 2:29 PM
  • application error 39 "error accessing external object property recipients

    this is an appountment item, createitem(1)

    I set location, subject, start reminder, duration, body and meetingstatus successfully

    but then fails on .recipients.add( string with value of my email)

    Tuesday, May 1, 2018 2:39 PM
  • Does setting the RequiredAttendees string property produce the same error?

    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    Tuesday, May 1, 2018 3:09 PM
  • I was not using that property but tried and same error for that property

    Tuesday, May 1, 2018 3:23 PM
  • Hello Russ,

    To make sure the issue is not related to OOM try to run the same code (for adding recipients) as a VBA macro.

    Sub CreateStatusReportToBoss() 
     Dim myItem As Outlook.MailItem 
     Dim myRecipient As Outlook.Recipient 
    
     Set myItem = Application.CreateItem(olMailItem) 
     Set myRecipient = myItem.Recipients.Add("Eugene Astafiev") 
     myItem.Subject = "Status Report" 
     myItem.Display 
    End Sub

    If you don't get the issue any longer with VBA macros than you deal with a security guard in Outlook. "Security" in this context refers to the so-called "object model guard" that triggers security prompts and blocks access to certain features in an effort to prevent malicious programs from harvesting email addresses from Outlook data and using Outlook to propagate viruses and spam. These prompts cannot simply be turned off, except in Outlook 2007 with an anti-virus application running. 

    Read more about that in the Outlook "Object Model Guard" Security Issues for Developers article.


    profile for Eugene Astafiev at Stack Overflow, Q&A for professional and enthusiast programmers

    Tuesday, May 1, 2018 3:49 PM
  • that took me some effort :)

    tried access macro and failed...finally found developer tab in outlook and created above macro, it resolved my email address.

    In my PowerBuilder app, several suggested bitness needed to be same so converted back to 32bit with same error.  When I commented out Recipient code, the appointment item opened fine with no recipients to send to obviously.

    Tuesday, May 1, 2018 6:17 PM
  • Hi Russ,

    To check whether this issue is specific to PowerBuilder app, I suggest you create a new Console App to call Outlook to add recipients, will you receive the same issue?

    If this issue happen only under PowerBuilder app, I would suggest you contact PowerBuilder support for help.

    Best Regards,

    Tao Zhou


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, May 2, 2018 6:35 AM
  • Hello Rus,

    Looks like the issues comes from a PowerBuilder app. Are you able to reproduce the issue with a regular windows form application or console?


    profile for Eugene Astafiev at Stack Overflow, Q&A for professional and enthusiast programmers

    Wednesday, May 2, 2018 9:51 PM