View Single Post
 
Old 08-18-2014, 11:56 PM
n00bie-n00b n00bie-n00b is offline Windows 7 32bit Office 2007
Novice
 
Join Date: Aug 2014
Posts: 17
n00bie-n00b is on a distinguished road
Default connecting combinations of letters? (smart people help needed)

Hi im trying to connect words ending in consonants to words beginning with vowels with a box, ie... bugger off

this is the code i have, works great for the consonants connecting to the vowels, but wont let me connect the special characters?!?

any ideas?

Also
thanks for your help

Code:
Sub newconnectttttt()
'
' newconnectttttt Macro
     '
     ' demo Macro
     '
    Application.ScreenUpdating = False
    With ActiveDocument.range
        With .find
            .ClearFormatting
            .Replacement.ClearFormatting
            .Text = "[wrtpdfghklvbnm" & ChrW(593) & ChrW(596) & ChrW(601) & ChrW(604) & ChrW(618) & ChrW(650) & ChrW(652) & "]" _
      & ChrW(9700) & _
      "[aeiouya" & ChrW(593) & ChrW(596) & ChrW(601) & ChrW(604) & ChrW(618) & ChrW(650) & ChrW(652) & "]"
            .Forward = True
            .Wrap = wdFindStop
            .Format = False
            .MatchWildcards = True
            .Execute
        End With
        Do While .find.Found
            .Borders.Enable = True
            .Collapse wdCollapseEnd
            .find.Execute
        Loop
    End With
    Application.ScreenUpdating = True
End Sub
(There is a symbol (ChrW(9700)) instead of a space if your wondering)
how can i get the characters to work, but also character combinations like ...

letter word ending in consonant to connect to "a" on its own, but also consonant connect to letter "a & ChrW(601)" together?

thanks guys

Last edited by n00bie-n00b; 08-19-2014 at 12:09 AM. Reason: more descripton
Reply With Quote