{"id":4010,"date":"2019-03-10T21:55:51","date_gmt":"2019-03-10T21:55:51","guid":{"rendered":"https:\/\/pariswells.com\/blog\/?p=4010"},"modified":"2019-03-10T21:55:51","modified_gmt":"2019-03-10T21:55:51","slug":"gpo-to-add-shared-calendar-to-users-outlook","status":"publish","type":"post","link":"https:\/\/pariswells.com\/blog\/research\/gpo-to-add-shared-calendar-to-users-outlook","title":{"rendered":"GPO to Add Shared Calendar to Users Outlook"},"content":{"rendered":"<p>VBA Script to Add a Shared Calendar to Users Outlook<\/p><p>[pastacode lang=&#8221;markdown&#8221; manual=&#8221;&#8216;You%20will%20need%20to%20disable%20Macro%20Security%20for%20this%20to%20run%0A&#8217;Use%20GPO%20to%20deploy%20VbaProject.OTM%20to%20%25appdata%25%5CMicrosoft%5COutlook%20folder%0A%0APrivate%20Sub%20Application_Startup()%0A%20%0ACall%20OpenMeetingRoom1%0A%20%0AEnd%20Sub%0A%0ASub%20OpenMeetingRoom1()%0A%0A%20%20%20%20Dim%20myNamespace%20As%20Outlook.NameSpace%0A%20%20%20%20Dim%20myRecipient%20As%20Outlook.Recipient%0A%20%20%20%20Dim%20CalendarFolder%20As%20Outlook.Folder%0A%20%20%20%20%0A%20%20%20%20Set%20myNamespace%20%3D%20Application.GetNamespace(%22MAPI%22)%0A%20%20%20%20Set%20myRecipient%20%3D%20myNamespace.CreateRecipient(%22Meeting%20Rooom%201%22)%0A%20%20%20%20myRecipient.Resolve%0A%20%20%20%20If%20myRecipient.Resolved%20Then%0A%20%20%20%20%20%20%20%20Call%20ShowCalendar(myNamespace%2C%20myRecipient)%0A%20%20%20%20End%20If%0A%20%0AEnd%20Sub%0A%0A%0A%0ASub%20ShowCalendar(myNamespace%2C%20myRecipient)%0A%20%20%20%20Dim%20CalendarFolder%20As%20Outlook.Folder%0A%0A%20%20%20%20Set%20CalendarFolder%20%3D%20_%0A%20%20%20%20%20%20%20%20myNamespace.GetSharedDefaultFolder%20_%0A%20%20%20%20%20%20%20%20(myRecipient%2C%20olFolderCalendar)%0A%20%20%20%20&#8217;Open%20up%20the%20Calendar%0A%20%20%20%20&#8217;CalendarFolder.Display%0AEnd%20Sub%0A&#8221; message=&#8221;&#8221; highlight=&#8221;&#8221; provider=&#8221;manual&#8221;\/]<\/p>","protected":false},"excerpt":{"rendered":"<p>VBA Script to Add a Shared Calendar to Users Outlook[pastacode lang=&#8221;markdown&#8221; manual=&#8221;&#8216;You%20will%20need%20to%20disable%20Macro%20Security%20for%20this%20to%20run%0A&#8217;Use%20GPO%20to%20deploy%20VbaProject.OTM%20to%20%25appdata%25%5CMicrosoft%5COutlook%20folder%0A%0APrivate%20Sub%20Application_Startup()%0A%20%0ACall%20OpenMeetingRoom1%0A%20%0AEnd%20Sub%0A%0ASub%20OpenMeetingRoom1()%0A%0A%20%20%20%20Dim%20myNamespace%20As%20Outlook.NameSpace%0A%20%20%20%20Dim%20myRecipient%20As%20Outlook.Recipient%0A%20%20%20%20Dim%20CalendarFolder%20As%20Outlook.Folder%0A%20%20%20%20%0A%20%20%20%20Set%20myNamespace%20%3D%20Application.GetNamespace(%22MAPI%22)%0A%20%20%20%20Set%20myRecipient%20%3D%20myNamespace.CreateRecipient(%22Meeting%20Rooom%201%22)%0A%20%20%20%20myRecipient.Resolve%0A%20%20%20%20If%20myRecipient.Resolved%20Then%0A%20%20%20%20%20%20%20%20Call%20ShowCalendar(myNamespace%2C%20myRecipient)%0A%20%20%20%20End%20If%0A%20%0AEnd%20Sub%0A%0A%0A%0ASub%20ShowCalendar(myNamespace%2C%20myRecipient)%0A%20%20%20%20Dim%20CalendarFolder%20As%20Outlook.Folder%0A%0A%20%20%20%20Set%20CalendarFolder%20%3D%20_%0A%20%20%20%20%20%20%20%20myNamespace.GetSharedDefaultFolder%20_%0A%20%20%20%20%20%20%20%20(myRecipient%2C%20olFolderCalendar)%0A%20%20%20%20&#8217;Open%20up%20the%20Calendar%0A%20%20%20%20&#8217;CalendarFolder.Display%0AEnd%20Sub%0A&#8221; message=&#8221;&#8221; highlight=&#8221;&#8221; provider=&#8221;manual&#8221;\/]<\/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":[2897,2895,1185,2896,847],"class_list":["post-4010","post","type-post","status-publish","format-standard","hentry","category-research","tag-add-meeting-room","tag-add-shared-calendar-to-users-outlook","tag-script","tag-vba","tag-vbs"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/4010","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/comments?post=4010"}],"version-history":[{"count":1,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/4010\/revisions"}],"predecessor-version":[{"id":4011,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/4010\/revisions\/4011"}],"wp:attachment":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/media?parent=4010"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/categories?post=4010"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/tags?post=4010"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}