Display document library items in Outlook 2007 programmatically.
-
2012年7月29日 下午 12:46
Hi everybody, I hope you're all fine.
I've created a folder in Outlook 2007 programmatically - which was simple to do - but I need to make this folder to display the items - MSG files - of a document library. How can this be done?.
Please, help.
Many thanks in advance for any help you provide.
Please, mark my reply as Answer if it helps or vote it up if it gives a key to the solution.
Thanks in advance and good luck.
Ahmed M. Gamil
"It is not titles that honor men, but men that honor titles."
SP Nuke
所有回覆
-
2012年7月30日 上午 02:05版主
Hi Gamil,
You can get the SharePoint library data using the list.asmx webservice, please refer to this link:
http://msdn.microsoft.com/en-us/library/lists.lists(v=office.12)After got the library data, you can loop to send them to your outlook:
http://msdn.microsoft.com/en-us/library/microsoft.office.interop.outlook.mailitem_methods
Also, you needn't to programming connect Outlook to SharePoint. There is a built-in way connect Outlook to SharePoint:
http://support.sherweb.com/Faqs/Show/how-to-integrate-sharepoint-contacts-in-outlook-2007-sharepoint-2010
http://office.microsoft.com/en-us/sharepoint-foundation-help/synchronize-sharepoint-2010-content-with-outlook-2010-HA101881295.aspxThanks,
Lhan Han- 已編輯 Lhan HanModerator 2012年8月6日 上午 09:26
- 已標示為解答 Lhan HanModerator 2012年8月6日 上午 09:27
-
2012年7月30日 上午 09:51Thank you Han, I really appreciate it.
Please, mark my reply as Answer if it helps or vote it up if it gives a key to the solution.
Thanks in advance and good luck.
Ahmed M. Gamil
"It is not titles that honor men, but men that honor titles."
SP Nuke -
2012年8月6日 上午 09:27版主Hi Gamil,
I had been updated my above reply, please checked whether it can help you.
Thanks,
Lhan Han
- 已編輯 Lhan HanModerator 2012年8月6日 上午 09:27
-
2012年8月10日 下午 10:32
If you want to synchronize your outlook calendar with SharePoint, you can do it without code : http://www.ehow.com/how_5818771_share-outlook-calendar-sharepoint.html
If you want to add an item on your SharePoint calendar programmatically, you have to create a new item on the calendar list (same code used on all sharepoint lists with specific calendar fields).
Try this sample code (http://quicklookfordotnet.wordpress.com/2010/10/27/programmatically-add-an-itemevent-to-a-sharepoint-2010-calendar/) :
//Get the Site under which you want to create Calendar.
using (SPSite site = new SPSite(http://localhost))
{
using(SPWeb web = site.AllWebs[0])
{//Give the Type of List you want to create,in Our case it’s nothing but Calendar.
SPList list = web.Lists["Calendar"];//Adding event into list
SPListItem newEvent = list.Items.Add();
newEvent["Location"] = “This is location”;
newEvent["Start Time"] = DateTime.Now;
newEvent["End Time"] = DateTime.Now.AddHours(1);
newEvent["Description"] = “Going for Meeting”;
newEvent["Title"] = “New Meeting”;
newEvent["fAllDayEvent"] = false;
newEvent["Category"] = “Meeting”;//Create Event in the sharpoint.
newEvent.Update();}
}
- 已編輯 Manish Joshi [MSFT] 2012年8月10日 下午 10:33
-
2013年3月11日 下午 02:59I know this is a very late reply but thank you so much, Manish.
Please, mark my reply as Answer if it helps or vote it up if it gives a key to the solution.
Thanks in advance and good luck.
Ahmed M. Gamil
"It is not titles that honor men, but men that honor titles."
SP Nuke

