Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / December 2006

Tip: Looking for answers? Try searching our database.

Lcase(lowercase)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sol Apache - 17 Dec 2006 12:05 GMT
I use firstname$ + ³.² + lastname$ + <companyemail.suffix> to create an
email address. The first two variables are also used as the signoff
signature and elsewhere.

My current client wants to have the whole email address in lower case. I
recorded a simple macro which searches out the email paragraph style and
changes everything to lower case. This works fine on my Mac but apparently
does not work on my client¹s PCs.

VB help has this example:

Dim UpperCase, LowerCase
Uppercase = ³Hello world 1234²
Lowercase = Lcase(UpperCase)

but I don¹t know how to place the relevant parts of my email into this, and
to ensure that firstname$, lastname$ remain as title case for its other
placements in the letterhead. Here is my email address code:

SenderEmail$ = firstName$ + ³.² + lastName$ + ³@² + ³TexEmailEnd.value

...

If SenderEmail$ <> ³ then
Selection.GotoWhat:=wdgotobookmark, Name:=²senderEmail²
Selection.typetext Text:=SenderEmail$
End If

There could be other ways of setting lowercase, but I am not sure what. Have
tried:
With typetext (or selection)
.lcase
End with

as well as:

Selection.typetext Text:=senderemail$
Dim uppercase,lowercase
Uppercase = senderemail$
Lowercase = Lcase(uppercase)

But neither work.

Would appreciate any help

Thx

Sol

(Incidentally it would be *lot* easier if Word had a lowercase option in
setting styles. All Word has for cases is Uppercase or small caps)
Jonathan West - 17 Dec 2006 13:07 GMT
>I use firstname$ + ³.² + lastname$ + <companyemail.suffix> to create an
> email address. The first two variables are also used as the signoff
[quoted text clipped - 17 lines]
>
> SenderEmail$ = firstName$ + ³.² + lastName$ + ³@² + ³TexEmailEnd.value

Change it to this

SenderEmail$ = LCase$(firstName$ & "." & lastName$ & "@" &
TexEmailEnd.value)

I always recommend using & for string concatenation rather than +.

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

Sol Apache - 17 Dec 2006 14:07 GMT
Hi Jonathan
Thank you very much. It¹s very simple, once I know what to do...

Sol

On 17/12/06 13:07, in article eVhfr9dIHHA.1816@TK2MSFTNGP06.phx.gbl,

>> I use firstname$ + ³.² + lastname$ + <companyemail.suffix> to create an
>> email address. The first two variables are also used as the signoff
[quoted text clipped - 24 lines]
>
> I always recommend using & for string concatenation rather than +.

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.