WUGNET, the Windows User Group Network
Your Complete Resource Center for "The Best" in Shareware, Computing Tips and Support, Windows Industry News... and much more!
Home Forums Shareware Windows Tips Hot Offers FREE Newsletters Arcade Contact Us About Partners
Search WUGNET: RSS Feeds RSS Feeds Advertise with WUGNET    |    Shareware eBooks
HomeHome FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

GetNamespace OpenSharedFolder SharePoint Calendar URL Method

 
   Home -> Office -> Programming VBA RSS
Next:  Saving attachemtns automatically  
Author Message
cro

External


Since: Nov 14, 2007
Posts: 1



(Msg. 1) Posted: Wed Nov 14, 2007 7:22 pm
Post subject: GetNamespace OpenSharedFolder SharePoint Calendar URL Method
Archived from groups: microsoft>public>outlook>program_vba (more info?)

I am trying to access a sharepoint Calendar event list but can not seem to
access the SharePoint Lists.pst.

Here is what I got on C#.
// Create an Outlook application.
Outlook._Application olApp = new
Outlook.ApplicationClass();

// Get the Mapi NameSpace and the Logon.
Outlook._NameSpace olNs = olApp.GetNamespace("MAPI");
olNs.Logon("YourValidProfile", Missing.Value, false,
true);
Outlook.MAPIFolder oFolder = null;

string cro =
"http://infoadm.com/sites/infoquality/Lists/MDB Data Activity
Calendar/calendar.aspx";
oFolder = olNs.OpenSharedFolder(cro,null,null,null);


// oFolder.Display
Console.WriteLine("WTF: " + oFolder.Name);


When I run the program I get this error,
System.Runtime.InteropServices.COMException (0x80020009): Invalid shared
folder.

at
Microsoft.Office.Interop.Outlook.NameSpaceClass.OpenSharedFolder(String Path,
Object Name, Object DownloadAttachments, Object UseTTL)
at OutlookExamples.OutlookClass1.Main(String[] args) Exception caught.

I can access and list my default Calendar but am stuck on how to access a
sharepoint calendar. Does anyone know how to use the "openShareFolder" I
have had no luck finding any refernence to this new method in Outlook 2007.

Thanks
-cro
Back to top
Login to vote
Sue Mosher [MVP-Outlook]

External


Since: Feb 11, 2005
Posts: 6513



(Msg. 2) Posted: Thu Nov 15, 2007 8:37 am
Post subject: Re: GetNamespace OpenSharedFolder SharePoint Calendar URL Method [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

As the Help topic for OpenSharedFolder explains, Sharepoint URLs need to use the stssync:// prefix not http://

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"cro" <cro RemoveThis @discussions.microsoft.com> wrote in message news:9067F98C-CBAA-4C54-9045-A2A85BB85C9F@microsoft.com...
>I am trying to access a sharepoint Calendar event list but can not seem to
> access the SharePoint Lists.pst.
>
> Here is what I got on C#.
> // Create an Outlook application.
> Outlook._Application olApp = new
> Outlook.ApplicationClass();
>
> // Get the Mapi NameSpace and the Logon.
> Outlook._NameSpace olNs = olApp.GetNamespace("MAPI");
> olNs.Logon("YourValidProfile", Missing.Value, false,
> true);
> Outlook.MAPIFolder oFolder = null;
>
> string cro =
> "http://infoadm.com/sites/infoquality/Lists/MDB Data Activity
> Calendar/calendar.aspx";
> oFolder = olNs.OpenSharedFolder(cro,null,null,null);
>
>
> // oFolder.Display
> Console.WriteLine("WTF: " + oFolder.Name);
>
>
> When I run the program I get this error,
> System.Runtime.InteropServices.COMException (0x80020009): Invalid shared
> folder.
>
> at
> Microsoft.Office.Interop.Outlook.NameSpaceClass.OpenSharedFolder(String Path,
> Object Name, Object DownloadAttachments, Object UseTTL)
> at OutlookExamples.OutlookClass1.Main(String[] args) Exception caught.
>
> I can access and list my default Calendar but am stuck on how to access a
> sharepoint calendar. Does anyone know how to use the "openShareFolder" I
> have had no luck finding any refernence to this new method in Outlook 2007.
>
> Thanks
> -cro
>
>
Back to top
Login to vote
Ken Slovak - [MVP - Outlo

External


Since: Oct 17, 2003
Posts: 2999



(Msg. 3) Posted: Thu Nov 15, 2007 9:59 am
Post subject: Re: GetNamespace OpenSharedFolder SharePoint Calendar URL Method [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi,

If you look at the Object Browser Help for OpenSharedFolder you should see a
note that for SharePoint folders you use an URL in this form:

"stssync://mysite/myfolder"

So it looks like your URL needs some adjustment.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"cro" <cro DeleteThis @discussions.microsoft.com> wrote in message
news:9067F98C-CBAA-4C54-9045-A2A85BB85C9F@microsoft.com...
>I am trying to access a sharepoint Calendar event list but can not seem to
> access the SharePoint Lists.pst.
>
> Here is what I got on C#.
> // Create an Outlook application.
> Outlook._Application olApp = new
> Outlook.ApplicationClass();
>
> // Get the Mapi NameSpace and the Logon.
> Outlook._NameSpace olNs = olApp.GetNamespace("MAPI");
> olNs.Logon("YourValidProfile", Missing.Value, false,
> true);
> Outlook.MAPIFolder oFolder = null;
>
> string cro =
> "http://infoadm.com/sites/infoquality/Lists/MDB Data Activity
> Calendar/calendar.aspx";
> oFolder = olNs.OpenSharedFolder(cro,null,null,null);
>
>
> // oFolder.Display
> Console.WriteLine("WTF: " + oFolder.Name);
>
>
> When I run the program I get this error,
> System.Runtime.InteropServices.COMException (0x80020009): Invalid shared
> folder.
>
> at
> Microsoft.Office.Interop.Outlook.NameSpaceClass.OpenSharedFolder(String
> Path,
> Object Name, Object DownloadAttachments, Object UseTTL)
> at OutlookExamples.OutlookClass1.Main(String[] args) Exception caught.
>
> I can access and list my default Calendar but am stuck on how to access a
> sharepoint calendar. Does anyone know how to use the "openShareFolder" I
> have had no luck finding any refernence to this new method in Outlook
> 2007.
>
> Thanks
> -cro
>
>
Back to top
Login to vote
psgopal

External


Since: Feb 28, 2009
Posts: 1



(Msg. 4) Posted: Sat Feb 28, 2009 5:05 am
Post subject: Re: GetNamespace OpenSharedFolder SharePoint Calendar URL Method [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

hi,

i tried with stssync instead of http.but still i got 'Invalid shared folder"
error

url:http://www.ureader.com/msg/10812975.aspx
Back to top
Login to vote
Display posts from previous:   
       Home -> Office -> Programming VBA All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Categories:
 Windows XP
 Windows Vista
 Windows Other
  Office
 Office Other
 Security
  • Home |
  • Shareware |
  • Windows Tips |
  • Hot Offers |
  • FREE Newsletters |
  • Arcade |
  • Forums |
  • eBooks |
  • About WUGNET |
  • Partners |
  • Contact

  • WUGNET Privacy Policy |
  • Link to WUGNET |
  • IT Support