Wednesday, January 5, 2011

Author-It: Pasting Text with Formatting

For those of you using Author-It, there is an unfortunate feature that text that is pasted into a topic (from a Word doc), gets a "No Paragraph Style". You then have to select the text and apply an AIT style. At the latest Author-It User Group meeting, the way to get around this was revealed.

Follow these steps:
  1. From the main window select: Import -> (Transformation) Profiles
  2. Select Word Documents
  3. Click Properties
  4. Check the box next to Use for Paste
Now, when you want to paste text into AIT, click:
Paste -> Paste Using Import Profile -> Word Documents

That's it. Happy pasting.

Wednesday, December 15, 2010

Filename Field Code in Word

Many times I'll use a field code to insert the filename into the footer of a document. The field code looks like this:

{ FILENAME \*MERGEFORMAT}

The result of the field code looks like this: foobar.doc

The filename has a ".doc" suffix. When I create the PDF, the filename in the footer still has the ".doc" suffix, and not ".pdf".

What I found is that the field code uses the filename exactly as it appears in the Windows Explorer window. This may sound trivial, but to solve the problem we just need to hide the extension in Windows Explorer.

To change the setting follow these steps:
  1. Open Windows Explorer
  2. Click Tools -> Folder Options
  3. Click on the View tab
  4. Check Hide extensions for known file types
Now, after updating the field code, we get foobar instead of foobar.doc.

[Source Wordribbon.Tips.net]

Monday, November 8, 2010

Painting in Irfanview

You learn something everyday. A co-worker asked me if I knew of a program to add circles and arrows to an image. Immediately, I thought "Irfanview must be able to do that". 

Quickly, I opened an image in Irfanview and searched the menus for "Add circle" or "Add arrow" or something like that. Instead I found the menu for "Show Paint Dialog". Bingo.

Click "Edit -> Show Paint Dialog", or type F12 and the MS Paint dialog opens. Now you have the capability of MS Paint from within Irfanview. Add a circle, add an arrow, or whatever you like :)

Thursday, October 28, 2010

En, Em, Eh, What?

There are different types of dashes: hyphen, en dash, and em dash. What is the difference between them?

Hyphen (-): This is the width of one digit. It is used to hyphenate words that break across a new line, or to join compound words. Ex. My, this professor is long-winded.

En Dash (–): This is the width of the letter 'n'. It is used to indicate a range of values. Ex. I will be on vacation from November 6–10.

Em Dash (—): This is the width of the letter 'w'. This is used to indicate a break in thought. Ex. I was eating pizza—and what a good pizza it was—with all my favorite toppings.

Using courier font we can get a better idea of the widths:
0 n m
- – —
[Sources: Fonts.com and Wikipedia]

Tuesday, October 12, 2010

Excel Macro for Background Color


I was writing an Excel Macro and I needed to set the background color of a cell based on the text value. To do this I wanted to use Conditional Formatting, and I found out that you cannot (AFAIK) setup Conditional Formatting from inside of a macro. But, you can create a macro that loops through a range and sets the formatting.

Here is how:
  1. Open the VB editor (Alt + F11)
  2. Open ThisWorkbook under Microsoft Excel Objects
  3. Add the following code:
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Set myRange = Range("C4:C104")
    For Each Cell In myRange
        If Cell.Value = "n" Then
            Cell.Interior.ColorIndex = 3
        End If
    Next
End Sub

Anytime  a change is made to the workbook, the macro is called. It checks a range of cells, and then if the text is 'n' it sets the background color to 3. But what is '3'?