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.

image

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

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

image

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 :

image

 

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

image

 

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.

image

 

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

You will see that new database would have been created.

image

 

9. Now you need to installed wordpress. You can visit following sites for downloading the latest version of wordpress https://wordpress.org/download/

image

 

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.

image

 

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.

image

image

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”

image

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

Select the language you want to work.

image

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.

image

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

image

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.

Earlier

Visual Studio 2010

image

 

 

Visual Studio 2013

image

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.

https://davecra.com/2015/10/28/a-complete-shared-add-in-template/

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  (http://georgemkurian.com/download) 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.

1)

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

 

image

 

2)

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.

image

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

 

image

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.

image

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

getImage=”getImage”

 

image

 

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 = Connect.office.GetExcel();
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

image

 

image

 

image

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