Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

changeing capitalization with a Word macro

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Question


The part numbers like BACR15CE6AD7 need to be capitalized, but everything else needs to be standard upper/lowercase, rather than all uppercase. It would be nice to take the A's and C's out from in front of the numbers of the steps, and move the table at the end to the first page.

Example

A1. INSTALL 451T1007-1 WEAR BLOCK TO TRAY WITH (2) BACR15CE6AD7 RIVETS PER BAC5004-1.
FAY SEAL BETWEEN WEAR BLOCK AND TRAY WITH BMS5-95 SEALANT (228460) PER BAC5000 AND FLAG NOTE 4.

A2. LOCATE (1) 451W1121-925 AND (4) -926 RADIUS FILLERS TO MATCH EXISTING ROLLER TRAY HOLE LOCATIONS PER DWG 451W1011 AND FLAGNOTE 3.
 
What you want to do is work out your search patterns, find (and select) the text, then set the case property to your range:
Code:
Selection.Range.Case = <your case type>
Valid case types:
wdLowerCase
wdNextCase
wdTitleSentence
wdTitleWord
wdToggleCase
wdUpperCase

I found this by recording a macro and looking at the generated code. You could do something similar once you've worked out the search patterns manually so you can look at the generated code for the methods you'll need. But, obviously, until you've worked out the specific search patterns, trying to code it won't be practical.

Hope this helps!
Bob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top