Upper Case

G

Guest

Is there a way i can ensure a document is all in upper case, i.e even if it
it entered in lower case it will convert after / during typing
 
O

Opinicus

Khartoum said:
Is there a way i can ensure a document is all in upper case, i.e even if
it
it entered in lower case it will convert after / during typing

I can't imagine why anyone would want to do this... but after typing it's
easy:

Control-A (defines entire document)
Format > Change case > Uppercase > OK.

Oh and if you depress the Caps Lock, you'll get all upper case while typing.
 
G

Guest

Why would you question my reasons and this is not a serious reply is it, i
assume you are joking. I am looking for some code thansk can anyone help
Kh
 
R

Robert M. Franz (RMF)

Khartoum said:
Why would you question my reasons and this is not a serious reply is it, i
assume you are joking. I am looking for some code thansk can anyone help

You might be surprised how many problems can be solved in questioning
the reasons/intent/background of the task of the OP! :)

If you are looking for code, you might want to _mention_ that --
Opinicus described a perfect way to achieve what you asked for.

If you are looking for a programmatic solution, you should mention in
what language. For VBA or a rough idea at the involved objects in Words
model, record a macro while executing the the manual approach.

Greetinx
Robert
 
G

Graham Mayor

Opinicus was wondering why you would want to produce a document all in upper
case, when such documents are hard to read. He nevertheless gave you the
answer you sought.

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

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
G

Guest

sorry should have made myself more clear and should have mentioned that the
data was in a word table, was hoping to find some vba which when exiting the
cell it would revert to upper case. Apologies Khartoum
 
S

Suzanne S. Barnhill

My preference would be Ctrl+A, Ctrl+Shift+A to apply All Caps formatting, as
this is more easily undone and preserves the original capitalization of
words (if any).

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
J

Jay Freedman

It turns out to be surprisingly hard to do this with VBA. The problem is
that there's no event that tells VBA explicitly when the selection is about
to exit from a table cell.

You could write macros named NextCell and PreviousCell to intercept the
press of the Tab or Shift+Tab keys in a table and convert the case of the
cell's contents. But those wouldn't run if the user pressed the arrow keys
or used the mouse to move the cursor.

You could write an event handler for the WindowSelectionChange event
(http://word.mvps.org/FAQs/MacrosVBA/AppClassEvents.htm). But the Sel
parameter (the selection, which represents the cursor position) of that
event tells you where the cursor moved to, not where it came from, so you'd
have to do some very tricky programming to figure out whether there is a
previous cell and, if so, whether the cursor actually came from that cell or
from somewhere else (possibly even a different document). I'm not sure it
could be done rigorously.

It would be much simpler to apply a paragraph style to the table, and
include the All Caps font formatting as part of that style. Then anything
typed there, whether upper or lower case, would appear in upper case.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 

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