I'm still grappling with vb code. I try to avoid the code that needs
selecting even if the recorded keystrokes give that. How can I get the same
results as below without using "Selection", pls?
****************************************************
Sub Uppercase()
'
Selection.WholeStory
Selection.Range.Case = wdUpperCase
End Sub
****************************************************
TIA. :oD
Jonathan West - 04 Apr 2007 22:31 GMT
> I'm still grappling with vb code. I try to avoid the code that needs
> selecting even if the recorded keystrokes give that. How can I get the
[quoted text clipped - 8 lines]
>
> TIA. :oD
ActiveDocument.Range.Case = wdUpperCase

Signature
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
StargateFanFromWork - 04 Apr 2007 23:32 GMT
>> I'm still grappling with vb code. I try to avoid the code that needs
>> selecting even if the recorded keystrokes give that. How can I get the
[quoted text clipped - 10 lines]
>
> ActiveDocument.Range.Case = wdUpperCase
Perfect! Thanks, Jonathan. I'll get the hang of it yet. :oD
Greg Maxey - 04 Apr 2007 22:31 GMT
If the cursor is the only indicator of the story that you are in then you
would have to do it something like this:
Sub Test()
ActiveDocument.StoryRanges(Selection.StoryType).Case = wdUpperCase
End Sub

Signature
Greg Maxey/Word MVP
See:
http://gregmaxey.mvps.org/word_tips.htm
For some helpful tips using Word.
> I'm still grappling with vb code. I try to avoid the code that needs
> selecting even if the recorded keystrokes give that. How can I get
[quoted text clipped - 8 lines]
>
> TIA. :oD