Problem with setting Subject of Outlook Email - InfoPath Dev
in

InfoPath Dev

Problem with setting Subject of Outlook Email

Last post 01-29-2010 02:13 AM by jgoerich. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 01-29-2010 02:13 AM

    Problem with setting Subject of Outlook Email

    Hello,

    we are using SharePoint 2003 and I coded a routine which is setting Action Items and sending an Email around in Outlook. The form is fully trusted (green hook at status bar bottom left corner). By trying to execute the following code, an error is appearing:

    [...] 

    id = XDocument.DOM.selectSingleNode("//my:id").text

    set mailapp = CreateObject("Outlook.Application")

    set mymail = mailapp.CreateItem(5) 'Maildocument

    set mytask = mailapp.CreateItem(3) 'Action Item

    set mytask_PrjL = mailapp.CreateItem(3) ''2nd Action Item

    subj = "Prototype Order #" + id + " - Material Order"

    cat = "Prototype Order"

    bodytxt = "Lorem ipsum"

    mytask.Subject = subj ' this works

    mytask_PrjL.Subject = subj 'this even works

    mymail.Subject = subj 'this throws an error "attribute write protected" in German "Eigenschaft ist schreibgeschützt"

    [...]

    there is some confussion in my mind, because that the set of the Subject attribute of the Action Item objects is working, but not the set of the Mail Item. Have you some suggestions about the Why or how I can overrun this issue using another method?

     Thanks

    Jan

Page 1 of 1 (1 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.