Saturday, March 21, 2009

Google Docs plug-in for Microsoft Word 2007

I have developed a Add-in for Word 2007 to perform upload, delete and list documents operations to your Google Docs account. The Add-in is developed using VSTO 2008 framework, so the installation requires .NET Framework 3.5 SP1 on your machine and VSTO runtime installation.

The following is the video recording of the Add-in in action.

You may download the installation from http://chaitblog.googlecode.com/files/GWord.zip

The Excel and PowerPoint AddIns follow.

Please do let me know your comments or suggestions.

Update: Excel and PowerPoint Add-ins are also developed. Checked in the source code to http://chaitblog.googlecode.com

Tuesday, February 10, 2009

Export your Google Contacts to CSV format

If you have not noticed before, it's possible to maintain the contact info, email addresses, phone numbers etc. of all your contact using your Google Account. Once you login to your GMail account, in the left side menu click Contacts. You can see all your contacts.

Using Google Contacts API, you can retrieve data of all your contacts email addresses. I have developed a small application using which you can retrive all your contacts email addresses and phone numbers.

The following is the code snippet that retrives the atom feed of all the contacts.

//Get the user feed. max-results by default is 25, lets keep 10000.
HttpWebRequest feedReq = (HttpWebRequest)WebRequest.Create("http://www.google.com/m8/feeds/contacts/" + txtemail.Text + "/full?max-results=10000");
feedReq.Method = "GET";
feedReq.ContentType = "application/x-www-form-urlencoded";

//use the already obtained AuthToken
feedReq.Headers["Authorization"] = "GoogleLogin auth=" + AuthToken;
HttpWebResponse response = (HttpWebResponse)feedReq.GetResponse();
StreamReader responseStream = new StreamReader(response.GetResponseStream());
string resp = responseStream.ReadToEnd();


Click here to download the executable. Running this application requires .NET Framework 3.5 installed on the machine.

Click here to download the source code. This project is created in VS2008 in C#.