26 Aug 2013

Insert a graphic from Greenshot into Excel, it doesn't appear on other computers

Introduction
I used Greenshot to capture a screen shot then I inserted it directly into an Excel workbook - everything looks fine. I saved the workbook as xlsx and e-mailed it to a colleague. The colleague opened it only to find the following:
The linked image cannot be displayed. The file may have been moved, renamed or damaged.



This usually would appear if you just link rather than inserting the image into the workbook. However, I had inserted it from Greenshot - I often use Greendshot to insert screen shots directly into Word without this trouble, what's going on? 


Reason
After a little searching on the web I found this:

There is a bug in: Greenshot 1.1.5 Build 2643, this is the current version, at the time of writing, August 2013. Greenshot is not inserting but linking to the image. We have to wait until 1.1.6 build 2741 for the fix. 


Workaround
Don't directly insert from Greenshot to Excel. Take your screen shot with Greenshot and first save, then insert the saved image file using Insert | Picture.

22 Aug 2013

Turn on the Developer tab in MS Office applications

Word, Excel, Powerpoint, Outlook, etc, have some additional features available on the Developer tab (ribbon bar). This tab is not turned on by default. Follow these steps to turn it on:

Click File | Options 
Click Customize Ribbon

Word 2010 Developer tab

On the right look through the list of Main Tabs and click to enable Developer (as shown above).
Click OK

If you are using Word you'll see the following:


It's similar for Outlook, Excel, PowerPoint and other MS Office applications.


NOTE: This applies to MS Office 2010 and 2013.

20 Aug 2013

Crunchbang Linux - Add a User

When you install Crunchbang Linux the installation invites you to create one user. Although this is often fine sometimes you may need another user id to be created. Follow the steps here to create a user - these steps should work with other similar Linux distributions too.


Add a User
Right click on the desktop, click Terminal
Enter the following command:
sudo adduser <username>
(where <username> is the new user name)

For example, I want to create a user called "fred":
sudo adduser fred    [Enter]

It will prompt you to enter a password twice (once and then to verify you entered it correctly).

Next it will prompt you to enter the full name and other details - you don't need to enter anything, just press Enter. It'll ask you if the information is correct, press Y for yes (see below for an example).


Once it's finished you'll be back at the $ prompt. The new user has been created! You can now login with the user.


Login as the New User
Right click on the desktop, click Exit
Click Logout
Wait...
The usual login screen will appear, login as "fred"
Crunchbang will display a window saying it has added the new user.
Also, once you've finished logging in the following HELLO message will appear:


Previously for the original Crunchbang user you probably already ran this script so just press Q to quit this screen.

As this is a new user you will have to configure the network/wireless and other settings.


Sudo Power
By default a new user does not have administrator (root) power. This means you will not be able to use sudo to run commands in the terminal. This maybe fine for you, this means the new user is restricted, they can't do much damage. However, if you want to give your new user the sudo power, follow these steps:

Exit and Logout
Login as your original user
Right click on the desktop and click Terminal
Type the following:
sudo visudo   [Enter]


Scroll down (use the keyboard arrow keys) to where it says:
# User privilege specification
root    ALL=(ALL)  ALL

Add a line under it as follows:
<username>   ALL=(ALL)  ALL
(where <username> is the new user you created)

In my example (screen shot above) it looks like this:

# User privilege specification
root    ALL=(ALL)  ALL
fred   ALL=(ALL)  ALL

Make sure it is correct, remember that Linux is case sensitive so double check everything you have typed.

Press Ctrl-X to exit
Press Y to save
Press Enter
You will be back at the terminal screen - finished!

13 Aug 2013

Compare two text files with Notepad++

Introduction
Often you may need to compare two text files to see the differences. Notepad++ is a very useful free text editor and you can easily add a free plug-in called 'Compare' to add this functionality:


Download
Download Notepad++
http://notepad-plus-plus.org/
Install Notepad++ if it's not already installed.


Check in Notepad++ that the Compare plugin is installed
With Notepad++ on the screen:
Click Plugins | Show Plugin Manager
Click Compare in the list and click Install
Accept the prompts...
Notepad++ will restart

Now on the Plugins menu you'll see the Compare option.


NOTE:
Normally the above is fine but in the past and possibly if you are troubleshooting, the following manual installation method might be useful:
Download the Compare plug-in for Notepad++
http://sourceforge.net/projects/npp-compare/?source=dlp
The download file is a zip, open it and extract the DLL inside. Copy this DLL file to:
C:\Program Files\Notepad++\Plugins
Start Notepad++ and now on the Plugins menu you can find the Compare option.



Using Compare in Notepad++
Let's say for example we have two text files - here's what to do:

Open both files in Notepad++

Click Plugins | Compare | Compare (or press Alt-D)

You'll see something similar to the following:

Notepad++ Compare

In our example it shows that in file1.txt on the left one line is present that is not there in file2.txt. Also in file2.txt on the right an additional line was added. Of course this is a very simple test but if you have a larger file you can use the Nav Bar to jump to where there are differences.

Nav Bar

In the above I was comparing large files. After running the Compare I saw in the Nav Bar that there were two lines (see the orange arrow in the image above) indicating two differences. I clicked and it took me to where the difference was. You can see some text is missing from one line in file2.txt.


Conclusion
It's very fast, even with very large files. It's also easy to use especially if you are already using Notepad++ for other work. Of course this can be used to compare all kinds of data such as log files, programming code or maybe CSV data files, etc. Compare for Notepad++ is excellent!
Recommended: 8 /10

If you want to compare two Excel worksheets please see my previous article on this subject which explains about using an add-on for Excel to compare files inside Excel:
http://mgxp.blogspot.ch/2013/07/excel-2010-compare-two-worksheets-using.html




Updated: August 2015
Notepad++ has a plugin installer built into it now. I updated this document to reflect this but I also left the manual download and installation steps just in case they are needed by anyone.