Thursday, July 8, 2010

Perform quick sorts in Word without using a table


Microsoft Word


Perform quick sorts in Word without using a table


Sorting in Excel is common and easy. It's not quite as common in Word, but the need does arise. For instance, you might want to sort a list of names, countries, companies, and so on. Sorting a simple list is easy, almost as easy as in Excel. Let's look at two sorting tasks, starting with the easiest.
Easy
I often see people use tables to sort, but that's (almost always) more work than is necessary. The simple list below is easily sorted, without converting the text into a table first, as long as each item in the sort is its own paragraph. Simply put, you can have only one sort item per line.

To sort this simple list of names, by first name (because that's the name that occurs first on each line), do the following:
  1. Select the list.
  2. From the Table menu, choose Sort. In Word 2007, click Sort in the Paragraph group on the Home tab.
  3. From the Sort By dropdown, choose Paragraphs.
  4. From the Type dropdown, choose Text. (To sort numbers and dates, choose the appropriate data type from the Type dropdown.)
  5. Click OK.

That's all there is to it! Now, that really was easy, wasn't it?
A little more work, but just barely
Now, what if you want to sort the list by last names? It's certainly doable, and without too much more work. In truth, the work isn't in the actual steps you must perform, but in just knowing what to do!
Sorting by the last name is just as easy as sorting by the first--you just select a different setting, as follows:
  1. Select the list.
  2. From the Table menu, choose Sort. In Word 2007, click Sort in the Paragraph group on the Home tab.
  3. From the Sort By dropdown, choose Word2. This is where things can get a bit dicey. The items in your list must be uniform, say two words (names) per line, separated by a space character. If the list isn't uniform in this way, the sort probably won't work.
  4. From the Type dropdown, choose Text.
  5. Click OK.

This time, Word sorted the whole list by the second word in each line. Word doesn't care about the context of the list items--Word only cares about each word's position. In addition, you can use a Tab character to separate words, instead of a space, and the sort will still work. In this case, Word uses the term field instead of word (in step 3).

allvoices

Where's the Chart Wizard in Office 2007?


Microsoft Office


Where's the Chart Wizard in Office 2007?


Office 2007 has been out for a while, but I'm still finding commands and features that I seldom use. For instance, recently I found the Chart Wizard in Access 2007. Actually, I wasn't looking for it, but when I saw its new home, I knew it was a logical move. Finding the wizard in Access baited my curiosity--I put my task aside to find the Chart Wizard in all of the Office 2007 applications.
Excel
In Excel 2003, the Chart Wizard is in plain site on the Standard toolbar. Select a range of data, click the button and Excel produces an embedded chart.
Starting with 2007, Excel no longer provides a Chart Wizard. Instead, the basic chart types are in the Charts group on the Insert tab. Simply click any chart type and follow the step-by-step instructions for completing the chart. To alter an existing chart, first, select the chart and then use the tools on the context-sensitive Design tab.
Word
Word's Chart Wizard hasn't really moved. In Word 2003, you choose Picture from the Insert menu and then choose Chart to launch Microsoft Graph. The Chart Wizard hasn't really moved in Word 2007 (or 2010). You'll find it on the Insert tab, in the Illustrations group.
If Excel 2007 is installed, Word has access to Excel's advanced charting capabilities. If Excel 2007 isn't installed, Word launches Microsoft Graph.
There's also a tool for organizational charts. Choose Picture from the Insert menu and then select Organizational Chart. Word will display a chart template and the Organizational Chart toolbar. In Word 2007 and 2010, this charting feature is harder to find. It's in SmartArt, which is in the Illustrations group on the Insert tab. After launching SmartArt, choose Hierarchy in the left pane.
Access
To add a chart to a form a report in Access 2003, you choose Chart Wizard from the New Form or New Report dialog box, respectively. Now, the Chart Wizard is in the Controls group on the Design tab. To add a chart, open a form or report in Design view and click the Chart Wizard. This move makes perfect sense to me.
PowerPoint
Like Excel 2003, PowerPoint 2003's Chart Wizard is on the Standard toolbar. Clicking the tool launches Microsoft Graph. Fortunately, the wizard's easy to find in PowerPoint 2007 and 2010. It's in the Illustrations group on the Insert tab.
Like Word 2007, if Excel 2007 is installed, the Chart Wizard has access to Excel's advanced charting capabilities. Without Excel 2007, the chart launches Microsoft Graph.

allvoices

Control the size of Excel's sheet tabs via a scrollbar setting



Microsoft Excel


Control the size of Excel's sheet tabs via a scrollbar setting


Using Windows Display settings, you can customize the Office user interface. It's a simple task and easily undone if you don't like results. I don't use it much, but there is one setting that a few users like--increasing the size of the Scrollbar item enlarges Excel's sheet tabs.
This setting might not make sense at first, but underneath the hood, Excel's sheet tabs are really a scrollbar. As you might expect, this setting also increases the size of all scrollbars so this setting is useful only if you don't mind larger scroll bars all the way around.
To increase the size of Excel's sheet tabs, adjust the Windows Display (Windows XP) setting as follows:
  1. From the Windows Start menu, choose Control Panel.
  2. Double-click Display.
  3. Click the Appearance tab.
  4. Click Advanced.
  5. From the Item dropdown list, select Scrollbar.
  6. Increase the setting of the Size option—the following shot shows the setting doubled from the default setting of 20 to 40.
  7. Click OK twice. It will take a few seconds for Windows to update your system.
Just remember that this setting will reach out and touch everything, even Windows Explorer and dialog boxes. (I don't suggest changing these settings if you share your computer with other people--at least not without consulting everyone concerned first.)
What's interesting is the number of interface objects you can control--there are 18. You might spend a little time experimenting; a small change here and there might be useful. I suggest that you note the original setting, just in case you decide to return to the default settings.

allvoices

How to Sync Google Calendar and Outlook


Microsoft Office


How to Sync Google Calendar and Outlook


One of my clients uses Google Calendar and I've learned to like the calendar app, but I still use Outlook almost exclusively for everything else. Switching between the two calendars was a nuisance. Entering appointments twice was a nuisance.
Fortunately, that's all behind me because Google Calendar Sync automatically coordinates both Outlook and Google Calendar:
  • If you enter an appointment in Outlook, it will appear in your Google calendar.
  • If you edit that same appointment in Google Calendar, the sync app will update the same appointment in Outlook.
  • Delete an appointment in either app and Google Calendar Sync deletes it in the other.
... and so on. You get the picture. What you do in one, the tool pushes to the other.
Fortunately, setting things up is almost as easy as running the tool to keep Google Calendar and Outlook coordinated:
  1. On the system that's running Outlook, download and install Google Calendar Sync. Just click the link and then click Save. (I shouldn't have to say this, but do not download anything from the Internet if you aren't running virus protection software.)
  2. Enter the Email address you use with your Google Calendar account.
  3. Enter the password for that account.
  4. For full synchronization, select 2-way in the Sync options. Click the option that best reflects your needs. Later, you can change your settings by double-clicking the Google Calendar Sync system icon in the Windows tray.
  5. Set the interval for automatic synchronization in the Sync every x minutes option. The default is 120 and you might find that adequate--I didn't.
  6. Click Save. It'll take a minute or two to download and install the app. If you have more than one Outlook profile, Outlook will prompt you to choose one.
  7. When the installation is done, click the Close button. (It doesn't stay on top, so it's easy to miss this step.) Google Calendar Sync will run automatically as soon as you install it.
After installing the sync tool, you'll see a new icon in your tray. (This is the icon you double-click to change your settings.) Right-click this icon to sync your calendars manually. Otherwise, the tool will sync your calendars according to the interval setting you entered during the installation process. During this time, the icon displays two opposing arrows that move up and down.

Once you get the hang of it, you'll forget its even running. Speaking only for myself, it runs well and as expected--no surprises. My one complaint is that my Outlook calendar wouldn't display existing items from my Google calendar; it does pick up new items added since installing the tool.
Note: I wanted to mention that the tool, as of June 11, 2010, does not work with Windows 7. I know, because I was asked about it on Twitter recently.

allvoices

Save time with quick auto-filtering in Excel 2003

 

Microsoft Excel


Save time with quick auto-filtering in Excel 2003


Excel's AutoFilter feature lets you view records that match specific criteria. All your data's still there, but Excel hides all rows that don't match the chosen criteria. You're probably already familiar with the feature and agree with me that it's easy to use.
The only complaint I have with the feature is the list--Excel creates a unique list of values and you choose the filtering criteria from that list. If the column contains lots of unique values, the list is a bit unwieldy--it just isn't as convenient as it can be.
A more convenient filtering solution makes use of what's already available:
  • You add a set of filtering buttons to any toolbar—probably the one you use most. If you're creating a custom application, you might create a custom toolbar just for filtering.
  • To use the buttons, you select your criteria right in the sheet and click a filtering button.
  • To view all your data, click another filtering button.
First, let's add those buttons to a toolbar, as follows:
  1. Make sure the toolbar you're going to add the buttons to is visible.
  2. Choose Customize from the Tools menu.
  3. Click the Commands tab.
  4. In the Categories list, select Data to update the Commands list.
  5. From the Commands list, drag the AutoFilter command to a toolbar.
  6. From the Commands list, drag the Show All command to the same toolbar--you'll want them right next to each other.
  7. Click Close to close the Customize dialog box.

Now you’re all set. To use the new toolbar buttons, just select a value and click AutoFilter (the button to the right of the Help button in the above toolbar). For example, in the sheet below, I selected A5 and clicked the AutoFilter button. Excel responded by displaying only those records that contain the same value, AT6-02, in column A. To remove the filter, click Show All. (This feature works similar to the Filter By Selection feature in Access.)


Adding these buttons helps avoid perusing a long list of criteria values. When lists are short, having the buttons available really doesn't save you any time or aggravation, unless you're building a custom filtering toolbar for a template. Or, you might just prefer this method--I think filtering by selection is less prone to mistakes than the list selection method.
You can't easily customize 2007's ribbon, but you can add these buttons to the Quick Access Toolbar.

allvoices

Modify Word's Close All icon image



Microsoft Word


Modify Word's Close All icon image


Most users add a few of their favorite commands to a toolbar for quick access. The addition of a few extra buttons isn't distracting or confusing. But, I ran into a situation recently that got the better of me...for just a minute. The Close and Close All commands use the same icon.
If you want both, you must remember which position represents which command, or change one of the icons. I chose the latter.
First, the good news: You don't need to be an expert to add a command to a toolbar. The steps are easy (in Word 2003 and earlier):
  1. Click the dropdown arrow that appears at the right end of any open toolbar, choose Add or Remove Buttons, and then click Customize. Or, right-click the background of any toolbar and choose Customize. Or, choose Customize from the Tools menu.
  2. Click the Commands tab in the resulting Customize dialog box. With this dialog open, the toolbars and menu bar, and all their menus and buttons are in Edit mode.
  3. From the Categories list, select the appropriate menu. In this case, click File (the default).
  4. Doing so updates the items in the Commands list to the right. Drag and drop the appropriate command from this list to a toolbar. To recreate my problem, drag Close and Close All to a toolbar.
I told you it was simple, but my situation was complicated by the two look-alike icons with different tasks.

Now, you might be able to remember that Close is on the left and Close All is on the right, but I don't trust myself that much. If you support users, you don't have much of a choice. In the end, I chose to edit the image of the Close All icon.
To modify an icon, the Customize dialog box must be open (in Edit mode); you can leave it open when you add the Close and Close All commands to a toolbar. If you closed the dialog box after adding the icons, you must open it again. Then, with the Customize dialog box open, click the Close All button on your toolbar and then click Modify Selection. At this point, you have at least three simple ways to distinguish Close All from Close.

Display text
The simplest solution is to display text instead of the icon. After clicking Modify Selection, choose the Text Only (Always) item on the resulting submenu. You can display the icon for one and text for the other, or display text for both. Either way, you'll have no trouble telling them apart.

Change the color
If displaying the icon text isn't an option, the next best solution is to change the color of one. After clicking Modify Selection, choose Edit Button Image. Click a colored square in the Colors section and then start clicking those tiny squares that make up the actual icon image. This is a tedious process, but don't worry about making a mistake. You can click Cancel at any time and start over. Click as many or as few of the squares as you like to get the look you want. Then, click OK when you're done.


This method is only marginally better than leaving both icons alone, as you still have to remember which color represents which command.
Add a clue
For myself, I'd probably use the Text option above. It's simple and gets the job done. That won't always work for users or custom templates. Sometimes company conventions limit your options. If you must use icon images, you need to distinguish one image from the other. The best solution I came up with was to add an A to the Close All icon.
This solution takes a bit more work, but only a little. After clicking Modify Select, choose Edit Button Image. This time, click a color and then click the appropriate squares to draw an A on the folder icon. When you're satisfied, click OK.


The icons are still similar, but the A on the Close All icon clearly identifies the difference between the two.
You can add Close and Close All to the Quick Access Toolbar in Word 2007, but it isn't easy to modify a button's image.

allvoices

Thursday, July 1, 2010

DNS querying with dig



For a system administrator, having ready access to all kinds of information for troubleshooting or configuration of computers and networks is important. When diagnosing connectivity issues, or setting up a new Web site or server, being able to accurately get information from DNS can be critical; DNS provides a lot of information that can really help in this regard.
On Linux, the best tool for this job is dig, part of the BIND collection of utilities. On Red Hat Enterprise Linux, CentOS and Fedora, dig is part of the bind-utils package; you don't need to actually have the BIND DNS server installed to make use of the utilities.
The dig command-line tool is used to query DNS name servers for information. It can be the default DNS server as defined for your system, or it can be any other DNS server you specify, including the root name servers. A typical invocation of dig would be as follows:

http://bit.ly/9SAyDh

Dig is quite verbose, so there is a lot of information here, and not all of it is useful. The important bits are the A records pointing to google.com, and the server that was queried (in this case 192.168.250.12). The information can be trimmed by specifying certain flags:

http://bit.ly/9SAyDh

Knowing the A record, or authoritative IP address, is very useful information. But so is knowing what DNS server is authoritative for that domain name, or knowing which mail servers accept mail for that domain. This can be done by telling dig to get the NS or MX records; if you want all of them, use the ANY option:
$ dig MX google.com +short
200 google.com.s9a2.psmtp.com.
300 google.com.s9b1.psmtp.com.
400 google.com.s9b2.psmtp.com.
100 google.com.s9a1.psmtp.com.
The +short option is very useful to just provide the answers; in this case, we have the names of the MX records with their priority.
Want to do a reverse lookup? This can be done with the -x option and specifying an IP address instead of a domain name:
$ dig -x 74.125.148.13 +short
s9b1.psmtp.com.
And if you want to see the results from a different DNS server, use the @ prefix with the DNS server to use:
$ dig @ns.isp.com google.com
There is also the TXT record for domains that can be useful, especially if you wan to look up SPF (Sender Policy Framework, an email validation system) information. For instance:

http://bit.ly/9SAyDh

The dig utility is very handy, especially when used with troubleshooting. It has a lot of options and a lot of different things it can do; take a look at the output of dig -h for an idea of the many options available.
Vincent Danen works on the Red Hat Security Response Team and lives in Canada. He has been writing about and developing on Linux for over 10 years.

allvoices