Archive for the ‘Code’ Category

How To Create Free Landing Page Using Google Form

Free Landing Page


You can create free landing page using Google Form instead of purchasing some expensive option, Though it might be limited in lot of senses but if your purpose is just to collect the email then this should be sufficient.

I tried to find free landing page which I can use for my website but couldn’t. I had tried majority of the free landing page available but didn’t find anything simple like Google Form. Also just creating landing page doesn’t auto respond for the email subscription. Commercially available Landing pages with email support are expensive as its per month based. I was looking for some simple solution for time being, So I experimented with Google Form and at last came up with this solution..

You can use Google Form on a Squeeze page where you can insert the Form in the Opt In section. I’ve given 2 method one using embedded content and another just using elements which we require from the form section.

Read more »

How to work with wordpress offline

Wordpress Offline


There are many advantages to work with wordpress offline.

1. You might be travelling and you don’t have internet connection and you want to finish of some coding.

2. Internet connection is slow and working offline would be very fast.

3. You don’t want to publish your result to the world before making sure everything is working fine.


So for all this advantage, You can use wordpress locally. To do that these are the steps

1. Download Wamp /XAMPP server. I’ll be guiding  you for wamp.

2. Install Wamp server on your machine.

Once installed you can browse to following folder to check. C:\wamp, here you will find the files for this server. If this server is not started up after the installation then manuall start it. You can start this server from this location by double clicking on

C:\wamp\wampmanager.exe or by going to your programs listed in start menu and clicking on it.


3. Now open your browser and type in the address bar

localhost or, you will see extensions and tools and projects listed.


Here you can see link “phpmyadmin”, click on this.

4. You will see login screen. The default password for phpmyadmin would be empty and user name would be “root”

username: root

password :



5.  In the next screen you need to create database, Here on top you can see databases link. Click on it.



7. Now you enter database which you want to create, In my case I entered “freebookstoread” and press create button. This database will be listed on the left hand side once created.



8. Now if you check c:\wamp\www

You will see that new database would have been created.



9. Now you need to installed wordpress. You can visit following sites for downloading the latest version of wordpress



10. Extract the zip file into your wamp server project location. Like in this case I had created project as “freebookstoread” and I extracted the wordpress into this location. Once you extract you will see similar files listed.



11. Here you will find a file called “wp-config-sample.php”. Open this file in a text editor.

Modify the line with  “database_name_here” to the new database name which you had created.

Like “define(‘DB_NAME’, ‘freebookstoread’) and

change the “username_here” to “root” and make “password_here” to empty.



Save this file after modification as wp-config.php.

12. Now if you open “localhost” in your browser, you will be able to see your project listed under Your Projects”. In this case “freebookstoread”


13. Now click on the newly listed project, this will take you through installation process for wordpress.

Select the language you want to work.


14. Now you need to configure your site title and site login(username, password), etc Save this password whatever you are going to give because this will be your site login.


15. Now click on “Install WordPress”, Once you are done you will see similar dialog as shown below.


16. Your site is setup for working offline. You can directly type in “localhost\<sitename>” in your browser and it will prompt for wordpress login and once you log, everything you see online you can see and configure offline.

In my case it would be “localhost\freebookstoread”


So Happy working with your site offline. All the best. If you have any doubts feel free to comment or send me mail.

Shared Addin Template for Office Applications

Metadata Editor


At times we would like to create our own Addin project for Office application. This can be done using the Addin Projects in Visual Studio.

Visual studio has stopped providing support for Shared addin project and at times we would like to have addin which would work in all major office application like Excel, Word, Powerpoint, Outlook etc.


Visual Studio 2010




Visual Studio 2013


So Microsoft has removed the shared addin project. Now if you want to create addin, you can only do for specific application.

So to solve the Problem. I downloaded the template project from this site.

Here David gives instruction on how to use the project. You can download the template this works for Excel, Word, Powerpoint and Outlook and register using regasm and it will show up in your Office application Ribbon.

Here’s the link to the same project, I’ve put in the  ( section so that you download from here, incase some issue is present with the original site.

Here’s the modification which I did for using for my project.


I commented the below lines in ThisAddIn_Startup(), As it was giving error.





Ribbon Specific action can be handled in this code. Rest of the properties like type of button, size of button and the icon can be done in the xml itself.


3) I renamed the project to my use, I wanted to build one Metadata editor for excel, word, powerpoint document hence I renamed to project to MetaEditor.

4) Changed all the guid to new guid values which you can get from guid generator.

5) Rename the addin and its description here



6) My project needed only Excel, word, Powerpoint support hence I removed the outlook specific code.

7) Also I didn’t need the TaskPane, hence I removed that as well.

8)You can add your own Buttons in xmls which would be in the resources folder.


9) For giving icons, Add new icon in the resource and add following code in getImage Function which you need to add in connect.cs as shown below and in xml add following line





Now  you are ready to go. You can add different dialogs and use Ribbon button to laumch it.


For getting office specific functionality you can directly use following codes, I’m giving you example of Excel, this you can use for any application only thing which would change is the Type of application specified and the Document/Page it returns.


Microsoft.Office.Interop.Excel.Application oExcelApp;
Microsoft.Office.Interop.Excel.Worksheet oSheet = null;

              oExcelApp =;
oSheet = (Excel.Worksheet)oExcelApp.ActiveSheet;


Here’s the screenshot of the project I had done. It will list all the Custom Properties, Shape objects, Document Variables, Tags etc in Excel, Word, Powerpoint Workbook/Document/Presentations. I’ll add link to my blog later giving information about this tool.

MetaData Editor






That’s all Folks. Let me know if you face any issues or need any help.