Archive for September, 2007

Automatic text in Microsoft Word.

Saturday, September 29th, 2007

AutoText

If you often use certain text or sentence that you type, the best way to do that is to set options AutoText in Microsoft Word by clicking Tools, AutoCorrect Options then click AutoText tab.
Type the word or sentence in Enter AutoText entries here box.
For example: How are you today, Mr. Automatic ?
Click Add button then click OK
To see your AutoText option is right, do the following things:
Type how a, so you will see on top of your text that you just type, like the picture below:

Press enter to insert the rest of the words.
Note:
Make sure the Show AutoComplete suggestions box is checked.

Select case in Visual Basic vs. Choose in Microsoft Excel

Sunday, September 23rd, 2007

Convert select case in Visual Basic code to simple formula in Microsoft Excel

In this exercise, the value selection is from 1 to 3 only. BTW, you can make the last number of value higher (more than 3).
Before continuing this subject, I show a simple case in Visual Basic form example.
Private Sub Command1_Click()
Dim Total As Integer
Text0.SetFocus
Select Case Text0.Text
Case 1
Total = 5 * 10
Case 2
Total = 6 * 100
Case 3
Total = 7 * 1000
End Select
Text2.SetFocus
Text2.Text = Total
End Sub

Here is the conversion version in Microsoft Excel formula.
I convert the Text0.Text to cell A6 and the Text2.Text to cell C6.
In this case, I consider cell C6 as a result of the calculation and the formula is:
=IF(A6>3,”",CHOOSE(A6,5*10,6*100,7*1000))
Note:
If the cell A6 is empty, the result will be #VALUE!
The valid number in cell A6 is 1, 2 and 3 only.

Mail Merge in Microsoft Word

Sunday, September 2nd, 2007

Mail Merge

Microsoft word provides Mail Merge in Microsoft Word. It means, we can send the same letter to many people. From my experience, we have to create two documents if we want to create a mail merge.
The first document is for the main letter and the second documents for keeping track of the data such as name, phone number and address records.
Point to remember, you should create a new table to hold some information that you need. We will use the first row of the table that I call as a column header for the main letter.