This is a multi-part message in MIME format.

------=_NextPart_000_0006_01C78023.79BF0140
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi all

Hopefully this is not as dumb as my last post, but I am trying to find a =
way to format any text that appears in quote marks to italic text "hi" =
to "hi"=20

is this possible

Craig
------=_NextPart_000_0006_01C78023.79BF0140
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.6000.16414" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp;Hi all</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Hopefully this is not as dumb as my =
last post, but=20
I am trying to find a way to format any text that appears in quote marks =
to=20
italic text&nbsp; "hi"</FONT><FONT face=3DArial size=3D2>&nbsp;to=20
<EM>"hi"</EM>&nbsp;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>is this possible</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Craig</FONT></DIV></BODY></HTML>

------=_NextPart_000_0006_01C78023.79BF0140--

Re: putting italics on text in quotes by Greg

Greg
Mon Apr 16 08:42:35 CDT 2007

Yes it is possible:

Sub ScratchMacro()
'Italicizes text exclusive of the quotes marks
Dim oRng As Range
Set oRng = ActiveDocument.Content
With oRng.Find
.ClearFormatting
.Text = """<*>"""
.Forward = True
.Wrap = wdFindStop
.MatchWildcards = True
Do While .Execute
With oRng
.MoveEnd Unit:=wdCharacter, Count:=-1
.MoveStart Unit:=wdCharacter, Count:=1
.Font.Italic = True
.Collapse wdCollapseEnd
End With
Loop
End With
End Sub

On Apr 16, 7:33 am, "cw" <c...@nodomain.con> wrote:
> Hi all
>
> Hopefully this is not as dumb as my last post, but I am trying to find a way to format any text that appears in quote marks to italic text "hi" to "hi"
>
> is this possible
>
> Craig



Re: putting italics on text in quotes by cw

cw
Tue Apr 17 03:11:50 CDT 2007

You are a legend

thanks

Craig


"Greg Maxey" <gmaxey@gmail.com> wrote in message
news:1176730955.362809.89810@n59g2000hsh.googlegroups.com...
> Yes it is possible:
>
> Sub ScratchMacro()
> 'Italicizes text exclusive of the quotes marks
> Dim oRng As Range
> Set oRng = ActiveDocument.Content
> With oRng.Find
> .ClearFormatting
> .Text = """<*>"""
> .Forward = True
> .Wrap = wdFindStop
> .MatchWildcards = True
> Do While .Execute
> With oRng
> .MoveEnd Unit:=wdCharacter, Count:=-1
> .MoveStart Unit:=wdCharacter, Count:=1
> .Font.Italic = True
> .Collapse wdCollapseEnd
> End With
> Loop
> End With
> End Sub
>
> On Apr 16, 7:33 am, "cw" <c...@nodomain.con> wrote:
>> Hi all
>>
>> Hopefully this is not as dumb as my last post, but I am trying to find a
>> way to format any text that appears in quote marks to italic text "hi"
>> to "hi"
>>
>> is this possible
>>
>> Craig
>
>




Re: putting italics on text in quotes by cw

cw
Tue Apr 17 10:56:02 CDT 2007

Almost perfect

its not working

I am currently working through with the debugger

and it is getting to this point and then jumping to the end

~~~>>> Do While .Execute
With oRng
.MoveEnd Unit:=wdCharacter, Count:=-1
.MoveStart Unit:=wdCharacter, Count:=1
.Font.Italic = True
.Collapse wdCollapseEnd
End With
Loop
End With


not an expert with vba so i am not sure why any help would be greatly
appreciated

thanks



Re: putting italics on text in quotes by Greg

Greg
Tue Apr 17 11:20:48 CDT 2007

Would you by chance be using those goofey little curley quotes? Try:

.Text = Chr(147) & "<*>" & Chr(148)


On Apr 17, 11:56 am, "cw" <c...@nodomain.con> wrote:
> Almost perfect
>
> its not working
>
> I am currently working through with the debugger
>
> and it is getting to this point and then jumping to the end
>
> ~~~>>> Do While .Execute
> With oRng
> .MoveEnd Unit:=wdCharacter, Count:=-1
> .MoveStart Unit:=wdCharacter, Count:=1
> .Font.Italic = True
> .Collapse wdCollapseEnd
> End With
> Loop
> End With
>
> not an expert with vba so i am not sure why any help would be greatly
> appreciated
>
> thanks



Re: putting italics on text in quotes by cw

cw
Wed Apr 18 05:13:55 CDT 2007

Quite a possibility

I will give it a try today and let you know
thanks for your help, much appreciated

Craig

"Greg Maxey" <gmaxey@gmail.com> wrote in message
news:1176826848.611739.309290@l77g2000hsb.googlegroups.com...
> Would you by chance be using those goofey little curley quotes? Try:
>
> .Text = Chr(147) & "<*>" & Chr(148)
>
>
> On Apr 17, 11:56 am, "cw" <c...@nodomain.con> wrote:
>> Almost perfect
>>
>> its not working
>>
>> I am currently working through with the debugger
>>
>> and it is getting to this point and then jumping to the end
>>
>> ~~~>>> Do While .Execute
>> With oRng
>> .MoveEnd Unit:=wdCharacter, Count:=-1
>> .MoveStart Unit:=wdCharacter, Count:=1
>> .Font.Italic = True
>> .Collapse wdCollapseEnd
>> End With
>> Loop
>> End With
>>
>> not an expert with vba so i am not sure why any help would be greatly
>> appreciated
>>
>> thanks
>
>



Re: putting italics on text in quotes by cw

cw
Wed Apr 18 05:13:55 CDT 2007

Quite a possibility

I will give it a try today and let you know
thanks for your help, much appreciated

Craig

"Greg Maxey" <gmaxey@gmail.com> wrote in message
news:1176826848.611739.309290@l77g2000hsb.googlegroups.com...
> Would you by chance be using those goofey little curley quotes? Try:
>
> .Text = Chr(147) & "<*>" & Chr(148)
>
>
> On Apr 17, 11:56 am, "cw" <c...@nodomain.con> wrote:
>> Almost perfect
>>
>> its not working
>>
>> I am currently working through with the debugger
>>
>> and it is getting to this point and then jumping to the end
>>
>> ~~~>>> Do While .Execute
>> With oRng
>> .MoveEnd Unit:=wdCharacter, Count:=-1
>> .MoveStart Unit:=wdCharacter, Count:=1
>> .Font.Italic = True
>> .Collapse wdCollapseEnd
>> End With
>> Loop
>> End With
>>
>> not an expert with vba so i am not sure why any help would be greatly
>> appreciated
>>
>> thanks
>
>




Re: putting italics on text in quotes by cw

cw
Wed Apr 18 06:56:28 CDT 2007

got it!!

Nice one

it was skipping a few out still after I changed that code to your last
message

but I noticed that it was skipping the ones with a full stop at the end

"hi." rather than "hi"

so I just copied the code and changed the new line to

.Text = Chr(147) & "<*>." & Chr(148)

added the full stop

it runs through it twice now but you barely notice the time difference

so its all cool

thanks very much for your help
Craig



"cw" <c@nodomain.con> wrote in message
news:NIednd5ferL-crjbRVnytAA@bt.com...
> Quite a possibility
>
> I will give it a try today and let you know
> thanks for your help, much appreciated
>
> Craig
>
> "Greg Maxey" <gmaxey@gmail.com> wrote in message
> news:1176826848.611739.309290@l77g2000hsb.googlegroups.com...
>> Would you by chance be using those goofey little curley quotes? Try:
>>
>> .Text = Chr(147) & "<*>" & Chr(148)
>>
>>
>> On Apr 17, 11:56 am, "cw" <c...@nodomain.con> wrote:
>>> Almost perfect
>>>
>>> its not working
>>>
>>> I am currently working through with the debugger
>>>
>>> and it is getting to this point and then jumping to the end
>>>
>>> ~~~>>> Do While .Execute
>>> With oRng
>>> .MoveEnd Unit:=wdCharacter, Count:=-1
>>> .MoveStart Unit:=wdCharacter, Count:=1
>>> .Font.Italic = True
>>> .Collapse wdCollapseEnd
>>> End With
>>> Loop
>>> End With
>>>
>>> not an expert with vba so i am not sure why any help would be greatly
>>> appreciated
>>>
>>> thanks
>>
>>
>
>
>