Form Field to Capitals

G

Graham Mayor

Run a macro containing the following on exit from the form field

Dim sText2 As String
sText2 = ActiveDocument.FormFields("Text2").Result
ActiveDocument.FormFields("Text2").Result = UCase(sText2)


--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

How can i set the Text2 form field to Ucase?
 
C

Corey

Thanks Graham.
Will give that a go.
Run a macro containing the following on exit from the form field

Dim sText2 As String
sText2 = ActiveDocument.FormFields("Text2").Result
ActiveDocument.FormFields("Text2").Result = UCase(sText2)


--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

How can i set the Text2 form field to Ucase?
 
M

macropod

Hi Corey,

You could simply set the formfield's 'Text format' property to Uppercase ..... Then you don't need any vba.

--
Cheers
macropod
[MVP - Microsoft Word]


How can i set the Text2 form field to Ucase?
 
C

Corey

How do i do that?
Hi Corey,

You could simply set the formfield's 'Text format' property to Uppercase .... Then you don't need any vba.

--
Cheers
macropod
[MVP - Microsoft Word]


How can i set the Text2 form field to Ucase?
 
D

Doug Robbins - Word MVP

Right click on the formfield and select Properties and then select "Uppercase" form the text format pulldown.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

How do i do that?
Hi Corey,

You could simply set the formfield's 'Text format' property to Uppercase .... Then you don't need any vba.

--
Cheers
macropod
[MVP - Microsoft Word]


How can i set the Text2 form field to Ucase?
 
G

Graham Mayor

Now why didn't I think of that? Doh!

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

Right click on the formfield and select Properties and then select "Uppercase" form the text format pulldown.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

How do i do that?
Hi Corey,

You could simply set the formfield's 'Text format' property to Uppercase .... Then you don't need any vba.

--
Cheers
macropod
[MVP - Microsoft Word]


How can i set the Text2 form field to Ucase?
 
M

macropod

Brain fade? Hopefully not terminal. Or maybe just a 'senior moment'!

--
Cheers
macropod
[MVP - Microsoft Word]


Now why didn't I think of that? Doh!

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

Right click on the formfield and select Properties and then select "Uppercase" form the text format pulldown.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

How do i do that?
Hi Corey,

You could simply set the formfield's 'Text format' property to Uppercase .... Then you don't need any vba.

--
Cheers
macropod
[MVP - Microsoft Word]


How can i set the Text2 form field to Ucase?
 
G

Graham Mayor

Could have been either. The humidity here is oppressive and let's face it I'm not as young as I was ;)

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

Brain fade? Hopefully not terminal. Or maybe just a 'senior moment'!

--
Cheers
macropod
[MVP - Microsoft Word]


Now why didn't I think of that? Doh!

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

Right click on the formfield and select Properties and then select "Uppercase" form the text format pulldown.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

How do i do that?
Hi Corey,

You could simply set the formfield's 'Text format' property to Uppercase .... Then you don't need any vba.

--
Cheers
macropod
[MVP - Microsoft Word]


How can i set the Text2 form field to Ucase?
 
C

Corey

'Now why didn't I think of that? Doh!' Even better, Why didn't i notice that tab option.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

Right click on the formfield and select Properties and then select "Uppercase" form the text format pulldown.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

How do i do that?
Hi Corey,

You could simply set the formfield's 'Text format' property to Uppercase .... Then you don't need any vba.

--
Cheers
macropod
[MVP - Microsoft Word]


How can i set the Text2 form field to Ucase?
 

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