{"id":1102,"date":"2008-05-20T22:40:23","date_gmt":"2008-05-20T22:40:23","guid":{"rendered":"https:\/\/kweaver.org\/cs\/pocket-outloo-1\/"},"modified":"2008-05-20T22:40:23","modified_gmt":"2008-05-20T22:40:23","slug":"pocket-outloo-1","status":"publish","type":"post","link":"https:\/\/kweaver.org\/cs\/pocket-outloo-1\/","title":{"rendered":"Pocket Outlook"},"content":{"rendered":"<p style=\"margin-top: 0; margin-bottom: 0\">So, Pocket Outlook is really easy.&#160; You just add a reference to Microsoft.WindowsMobile and Microsoft.WindowsMobile.PocketOutlook. (Right click on your project, select Add Reference, and make sure you are at the .Net tab and click them. <\/p>\n<p style=\"margin-top: 0; margin-bottom: 0;\">&#160;<\/p>\n<p style=\"margin-top: 0; margin-bottom: 0;\">Here&#8217;s the code to get things started:<\/p>\n<p style=\"margin-top: 0; margin-bottom: 0;\">&#160;<\/p>\n<p style=\"margin-top: 0; margin-bottom: 0;\">Dim polApp As Microsoft.WindowsMobile.PocketOutlook.OutlookSession = New outlook.OutlookSession\n<\/p>\n<p style=\"margin-top: 0; margin-bottom: 0;\">&#160;<\/p>\n<p style=\"margin-top: 0; margin-bottom: 0;\">To go through each task, here is the code:<\/p>\n<p style=\"margin-top: 0; margin-bottom: 0;\"> Dim oItems As outlook.TaskCollection<br \/>\nDim otask As outlook.Task<\/p>\n<p style=\"margin-top: 0; margin-bottom: 0;\">&#160;<\/p>\n<p style=\"margin-top: 0; margin-bottom: 0;\"> oItems = polApp.Tasks.Items<\/p>\n<p style=\"margin-top: 0; margin-bottom: 0;\">&#160;<\/p>\n<p style=\"margin-top: 0; margin-bottom: 0;\"> Dim i As Integer<br \/>\nFor i = 0 To oItems.Count &#8211; 1<br \/>\noTask = oItems(i)<br \/>\nIf oTask.Subject = &quot;Change Infusion Set&quot; Then<br \/>\notask.Complete = True<br \/>\notask.Update()<br \/>\nEnd If<br \/>\nNext<\/p>\n<p style=\"margin-top: 0; margin-bottom: 0;\">&#160;<\/p>\n<p style=\"margin-top: 0; margin-bottom: 0;\"> polApp.Dispose() &#8216;not sure if it is needed<\/p>\n<p style=\"margin-top: 0; margin-bottom: 0;\">&#160;<\/p>\n<p style=\"margin-top: 0; margin-bottom: 0;\">Note that you have to save both the Items collection and the item you are looking at.&#160;If you don&#8217;t save the item you are looking at, you won&#8217;t update the item itself.&#160; Weird, but them&#8217;s the rules.<\/p>\n<p style=\"margin-top: 0; margin-bottom: 0;\">&#160;<\/p>\n<p style=\"margin-top: 0; margin-bottom: 0;\">Finally, the code to set up a task:<\/p>\n<p style=\"margin-top: 0; margin-bottom: 0;\">&#160;<\/p>\n<p style=\"margin-top: 0; margin-bottom: 0;\"> &#8216;Create a new outlook item<br \/>\notask = New outlook.Task<br \/>\notask.Subject = &quot;Change Infusion Set&quot;<br \/>\notask.Body = &quot;Change Infusion Set&quot;<br \/>\notask.StartDate = strDate<br \/>\notask.DueDate = strDate<br \/>\notask.Complete = False<br \/>\notask.Categories = &quot;Medical&quot;<\/p>\n<p style=\"margin-top: 0; margin-bottom: 0;\">&#160;<\/p>\n<p style=\"margin-top: 0; margin-bottom: 0;\"> Dim StrTime As String<br \/>\nIf Me.DateTimePicker1.Value &lt;&gt; Nothing Then<br \/>\nIf reminder = True Then<br \/>\nMe.lblResults.Text = &quot;In Reminder&quot;<br \/>\notask.ReminderSet = True<br \/>\nStrTime = Convert.ToString(Me.DateTimePicker1.Value.TimeOfDay)<br \/>\notask.ReminderTime = Convert.ToDateTime(strDate &amp; &quot; &quot; &amp; StrTime)<br \/>\notask.Complete = False<br \/>\nElse<br \/>\notask.ReminderSet = False<br \/>\nEnd If<br \/>\nEnd If<br \/>\n&#8216;  Save to Tasks<br \/>\npolApp.Tasks.Items.Add(otask)<br \/>\n&#8216;      lblResults.Text = &quot;Task has been created for &quot; &amp; strDate<br \/>\nEnd Sub<\/p>\n<p style=\"margin-top: 0; margin-bottom: 0;\">&#160;<\/p>\n<p style=\"margin-top: 0; margin-bottom: 0;\">\n<\/p>\n<p style=\"margin-top: 0; margin-bottom: 0;\">&#160;<\/p>\n<p style=\"margin-top: 0; margin-bottom: 0;\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>So, Pocket Outlook is really easy.&#160; You just add a reference to Microsoft.WindowsMobile and Microsoft.WindowsMobile.PocketOutlook. (Right click on your project, select Add Reference, and make sure you are at the .Net tab and click them. &#160; Here&#8217;s the code to get things started: &#160; Dim polApp As Microsoft.WindowsMobile.PocketOutlook.OutlookSession = New outlook.OutlookSession &#160; To go through [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1102","post","type-post","status-publish","format-standard","hentry","category-blog"],"_links":{"self":[{"href":"https:\/\/kweaver.org\/cs\/wp-json\/wp\/v2\/posts\/1102","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kweaver.org\/cs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kweaver.org\/cs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kweaver.org\/cs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kweaver.org\/cs\/wp-json\/wp\/v2\/comments?post=1102"}],"version-history":[{"count":0,"href":"https:\/\/kweaver.org\/cs\/wp-json\/wp\/v2\/posts\/1102\/revisions"}],"wp:attachment":[{"href":"https:\/\/kweaver.org\/cs\/wp-json\/wp\/v2\/media?parent=1102"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kweaver.org\/cs\/wp-json\/wp\/v2\/categories?post=1102"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kweaver.org\/cs\/wp-json\/wp\/v2\/tags?post=1102"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}