.Range.Case constants 
Author Message
 .Range.Case constants

   If Trim(strReturnValue) <> "" Then
      With Selection
         .InsertAfter strReturnValue
         .Range.Case = wdTitleWord
         .Collapse wdCollapseEnd
      End With
   End If

It would appear this would make the string title case but
it does not. The return value string typically has values
of "This is a string THAT HAS several words in it."
The "THAT HAS" part of the string does not become Title
Case. It remains all caps. However, the remainder of the
string (lower case) is changed to Title Case. Any ideas
are appreciated.

Sincerely,
MonkeyPaws
CEO, MonkeyPawsRUs, Inc.



Sat, 01 Jan 2005 00:43:05 GMT  
 .Range.Case constants
Hi MonkeyPaws

Can you change the string first and then insert it, as in the following?

strReturnValue = "This is a string THAT HAS several words in it"
strReturnValue = StrConv(strReturnValue, vbProperCase)
MsgBox strReturnValue

HTH


Quote:
>    If Trim(strReturnValue) <> "" Then
>       With Selection
>          .InsertAfter strReturnValue
>          .Range.Case = wdTitleWord
>          .Collapse wdCollapseEnd
>       End With
>    End If

> It would appear this would make the string title case but
> it does not. The return value string typically has values
> of "This is a string THAT HAS several words in it."
> The "THAT HAS" part of the string does not become Title
> Case. It remains all caps. However, the remainder of the
> string (lower case) is changed to Title Case. Any ideas
> are appreciated.

> Sincerely,
> MonkeyPaws
> CEO, MonkeyPawsRUs, Inc.



Sat, 01 Jan 2005 01:42:50 GMT  
 .Range.Case constants
Ah yes, I have seen the light. Much better. Thank you.

Sincerely,
MonkeyPaws
CEO, MonkeyPawsRUs, Inc.

Quote:
>-----Original Message-----
>Hi MonkeyPaws

>Can you change the string first and then insert it, as in
the following?

>strReturnValue = "This is a string THAT HAS several words
in it"
>strReturnValue = StrConv(strReturnValue, vbProperCase)
>MsgBox strReturnValue

>HTH


message

>>    If Trim(strReturnValue) <> "" Then
>>       With Selection
>>          .InsertAfter strReturnValue
>>          .Range.Case = wdTitleWord
>>          .Collapse wdCollapseEnd
>>       End With
>>    End If

>> It would appear this would make the string title case
but
>> it does not. The return value string typically has
values
>> of "This is a string THAT HAS several words in it."
>> The "THAT HAS" part of the string does not become Title
>> Case. It remains all caps. However, the remainder of the
>> string (lower case) is changed to Title Case. Any ideas
>> are appreciated.

>> Sincerely,
>> MonkeyPaws
>> CEO, MonkeyPawsRUs, Inc.

>.



Sat, 01 Jan 2005 02:10:26 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. How do I select a constant time range from a variable time range using VBA

2. How come no StrConv constant for Sentence case?

3. SELECT CASE with constants

4. Select Case range

5. Case statement with a range of integers

6. How do I select a constant time range from a variable time range using VBA?

7. Change Case (Upper/Lower/Setence/Title CASE)

8. "select...case", multiples cases not possible ?

9. RTF format - changing case (and case only!)

10. Select Case and Case 0 To 9

11. VBScript Select Case vs VB Select Case

12. Converting a Upper Case String to Upper and Lower Case

 

 
Powered by phpBB® Forum Software