Tuesday, September 7th, 2010

Visual Basic 2008 Express – select a textbox contents

When you hand control back to a textbox in Visual Basic it’s useful if you also select the textbox contents so a user can just start typing over the current contents. Here’s how to do this – place the code in the Textbox_gotfocus event handler:

TextBox.SelectionStart = 0
TextBox.SelectionLength = Len(TextBox.Text)

How easy is that?

Helen Bradley

Thursday, April 9th, 2009

Cool Word 2003 and 2007 Breakout Boxes


Breakout boxes or pull quotes are a great way to add visual variety to a very text heavy document. Even if you don’t have images you can use you can still add some color and interest to the page. To do this, you will need some text to use – ideally it will be an interesting quote or sentence or two from the document itself. You will copy this so it appears in the correct position in the text but so it is also a feature element on the page.

Create a textbox
Start by selecting and copying the text. Click outside the text so it is no longer selected and choose Insert > Text box and draw a textbox on the page. Click inside it and choose Edit > Paste to paste in the text on the clipboard.

Format the text
Text in a breakout box looks better if it is formatted differently to the surrounding document, for example you may want to center it, change the font and adjust the line spacing to double line spacing so that the text looks very different.

Format the text box
You can add a colored background behind the textbox by selecting the textbox and choose Format > Textbox and from the Colors and Lines tab select a Fill Color for the textbox. To remove the border line, choose Line Color > No Line (or choose a line option that you like), and click Ok.

Add quote marks
Adding an oversize pair of quotation marks helps delineate the breakout box or pull quote from the remainder of the document. In this instance it’s best to place the oversize quotation marks each in a separate textbox, format them so they are very large, set the textbox so that the fill color is set to No Fill and the line color to No Line and then drag it into position over the textbox that contains the breakout text.

Set the wrapping
If you set this small textbox’s wrapping to in front of text the text will not be forced to wrap around it and the textbox with the pull quote will control the wrapping not the double quote marks. Format the double quote marks in an interesting font that has an attractive shape for the quotes so that you create an interesting effect.

Helen Bradley

Wednesday, March 11th, 2009

Instant text boxes in Microsoft Word


Just a short tip today, I just tripped over this and thought “WOW! I didn’t know that!” so I wonder if you know it too?

Ok.. step back a bit. I’m doing a column on columns in Word and I’m showing how to place a text box or image in a document laid out in 2 columns so the text box or image travels with the text and how to take it out of the line of text so it floats independently.

To create the text box, I select my text, then realize I need to create the text box first and click the Text box button without deselecting the text. [insert WOW moment in here].

What happened was that the text box got created automatically and the selected text appears inside it – just like that – how cool is that?

So, next time, instead of creating a text box and then copying and pasting text into it, select the text and click the Text Box button on the Drawing toolbar in Word 2003 and earlier and it will all be done automatically for you in one smooth step. The same process works in Word 2007 too but you must click the Insert tab, click the Text box button and choose Draw Text Box for it to happen.

Instant text in text boxes in Microsoft Word – can’t ask for anything more simple than that.

Helen Bradley