C# .NET - how to store outlook body text phone number (or) selected area in sql

Asked By Ravi Chaitanya
03-Feb-12 10:06 AM
HI,
I am using windows application 
OutlookAddIn1(office-2007) in VS2010,
now my outlook inbox have some mails and each mail have phone numbers , now my task is select the phone number and click the mouse right click , i have save text or save number option will appear how it is possible and select that option store that text into sql server2008 database table pls help my any one have idea about that topics
 
  Amit Choudhary replied to Ravi Chaitanya
03-Feb-12 11:08 PM
For Outlook mail management, we have created a module in our company.
MS provides a web service for Outlook.
You can use that mail service to access any mail in outlook 
http://msdn.microsoft.com/en-us/library/aa579187%28v=exchg.140%29.aspx
By accessing mail body you can save it at SQL server or when ever you want.

  [)ia6l0 iii replied to Ravi Chaitanya
07-Feb-12 08:14 AM
If you have it placed as a toolbar button, then add a ClickEventHandler and write the code to save the phone number in the clickEventhandler code. 

If you have added the commandbar button through designer or code, make sure you add the clickevent handler. The following sample shows that a clickeventhandler is associated to a button's click event.

saveNumberButton.Click += new Microsoft.Office.Core._CommandBarButtonEvents_ClickEventHandler(this.SaveNumberButtonClick);

And then in your event handler, add the code to "save it to database"

private void SaveNumberButtonClick(CommandBarButton cmdBarbutton,ref bool cancel)
{
   
//Place your saving to sql code here.
}


Hope this helps.
Create New Account
help
Microsoft Office Outlook has stopped working - HELP Outlook Outlook 2007 has been installed for all of 6 days. Today it stopped responding. I can no longer run Outlook 2007. Every time I open it I get I do the Check online for a solution and close the program, and the program just closes. I have run Microsoft Office Diagnostics and no errors. Scanpst and no problems. I am running Vista Business and Office 2007. I hate I am going to have to go back to XP Pro and Office 2003, but this is unbearable. My problem is I copied all my emails to Outlook
Microsoft Office Outlook has stopped working Outlook I'm running Windows Vista Ultimate with Office 2003. I have all the latest updates and SP for my computer. I run Outlook all day and when I go and close it out I get the message "Microsoft Office Outlook has stopped working windows is checking for a solutions to the problem" and then the Has anyone found an answer for this. I only have this problem when I close Outlook. Thanks, Terry Outlook General Discussions Windows Vista (1) Outlook 2007 (1) Outlook 2003 (1) Office
Outlook Express2003 Closes Automatically Outlook Outlook Express continually closes right after I open it and I can't get it to fixing it or what to do - any suggestions. I am using Vista if that helps. Outlook General Discussions Windows Vista (1) Outlook 2003 (1) Office 2003 (1) Outlook (1) Office (1) Vista (1) Are you using Outlook Express or Outlook 2003? Assuming Outlook 2003, does
managing out of office outlook out of office outlook VBA Asked By Morris dany 06-Nov-11 04:28 PM Reply I am looking my new emails to be forwarded to an other person when I am out of office. I have Outlook 2003. Here’s an example of a simple macro that sends an Outlook email. Sub sl() Dim olApp As Outlook.Application Dim objMail As Outlook.MailItem Set olApp = Outlook.Application Set objMail = olApp.CreateItem(olMailItem
Microsoft Office Outlook is synchronizing folders Outlook Hi there, I use Outlook 2003 on many machines but have had a problem with my main workstation whereby when a while and a 'new' icon pops up in the tooltray informing me that Microsoft Office Outlook is synchronizing folders. This *I think* happened around the time I installed Avast! Antivirus and behaviour on another PC now. Most of the Google hits mention Exchange Server and / or Office 2007 but I am using XP Pro, Office 2003 and POP3 - no Exchange Server - for email. Has anyone else come across this problem