TEXT conert to Title Case

T

Thejan Mendis

Hi,

Anybody can help me to make a macro to convert text in a textbox to TITLE
CASE.


TJ
 
R

Ren? Probst

hello

Assuming it is the first Textbox (or better the first Shape) within
the main story in the document, than like this:

Sub TestJ()
Dim oRange As Range
Set oRange = ActiveDocument.Shapes(1).TextFrame.TextRange
oRange.Case = wdTitleWord
End Sub


Greatings
René Probst
Switzerland
 
M

Mark Tangard

In the textbox's _Exit event, use:

TextBox1.Text = StrConv(TextBox1.Text, vbProperCase)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top