<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Code</title><link>https://www.infopathdev.com:443/forums/45.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Problem with setting Subject of Outlook Email</title><link>https://www.infopathdev.com:443/forums/thread/51142.aspx</link><pubDate>Fri, 29 Jan 2010 10:13:51 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:51142</guid><dc:creator>jgoerich</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/51142.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=51142</wfw:commentRss><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;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:&lt;/p&gt;&lt;font size="2"&gt;
&lt;p&gt;&lt;em&gt;[...]&amp;nbsp;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;id = XDocument.DOM.selectSingleNode(&amp;quot;//my:id&amp;quot;).text&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;set mailapp = CreateObject(&amp;quot;Outlook.Application&amp;quot;)&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;set mymail = mailapp.CreateItem(5) &amp;#39;Maildocument&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;set mytask = mailapp.CreateItem(3) &amp;#39;Action Item&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;set mytask_PrjL = mailapp.CreateItem(3) &amp;#39;&amp;#39;2nd Action Item&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;subj = &amp;quot;Prototype Order #&amp;quot; + id + &amp;quot; - Material Order&amp;quot;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;cat = &amp;quot;Prototype Order&amp;quot;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;bodytxt = &amp;quot;Lorem ipsum&amp;quot;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;mytask.Subject = subj &amp;#39; this works&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;mytask_PrjL.Subject = subj &amp;#39;this even works&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;mymail.Subject = subj &amp;#39;this throws an error &amp;quot;attribute write protected&amp;quot; in German &amp;quot;Eigenschaft ist schreibgeschützt&amp;quot;&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;[...]&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;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?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Thanks&lt;/p&gt;
&lt;p&gt;Jan&lt;/p&gt;&lt;/font&gt;</description></item></channel></rss>