create a macro to italicise case names

M

megan

I need to create a macro that will italicise all the case names in my
footonotes, the names change, but there is always a v in the middle, eg:
Microsoft v Apple or Dave v Frank, is this possible?

any help much appreciated.
 
P

Pesach Shelnitz

Hi Megan,

The following macro should do what you want. Note that this macro runs
silently. You will have to look in the footnotes to see the results.

Sub FormatCaseNames()

With ActiveDocument.StoryRanges(wdFootnotesStory)
Do While .Find.Execute("<[A-Za-z]{1,}> v <[A-Za-z]{1,}>", _
MatchWildcards:=True, _
Wrap:=wdFindStop, Forward:=True) = True
.Font.Italic = True
.Collapse Direction:=wdCollapseEnd
Loop
End With
End Sub
 
M

megan

Hi,

Thanks for that, it's really clever! Just one thing that i should have
mentioned, the case name lengths vary, so it isn't always one name v another
name, it could be Microsoft plc an others v Allians.

Do you know if it is possible to get the macro to be able to do that still?

Thanks very much

Pesach Shelnitz said:
Hi Megan,

The following macro should do what you want. Note that this macro runs
silently. You will have to look in the footnotes to see the results.

Sub FormatCaseNames()

With ActiveDocument.StoryRanges(wdFootnotesStory)
Do While .Find.Execute("<[A-Za-z]{1,}> v <[A-Za-z]{1,}>", _
MatchWildcards:=True, _
Wrap:=wdFindStop, Forward:=True) = True
.Font.Italic = True
.Collapse Direction:=wdCollapseEnd
Loop
End With
End Sub

--
Hope this helps,
Pesach Shelnitz


megan said:
I need to create a macro that will italicise all the case names in my
footonotes, the names change, but there is always a v in the middle, eg:
Microsoft v Apple or Dave v Frank, is this possible?

any help much appreciated.
 
P

Pesach Shelnitz

Hi,

You would need some definite criteria to determine whether the preceding
words are part of the name of one side and whether the subsequent words are
part of the name of the other side. Do you have such criteria?
--
Hope this helps,
Pesach Shelnitz


megan said:
Hi,

Thanks for that, it's really clever! Just one thing that i should have
mentioned, the case name lengths vary, so it isn't always one name v another
name, it could be Microsoft plc an others v Allians.

Do you know if it is possible to get the macro to be able to do that still?

Thanks very much

Pesach Shelnitz said:
Hi Megan,

The following macro should do what you want. Note that this macro runs
silently. You will have to look in the footnotes to see the results.

Sub FormatCaseNames()

With ActiveDocument.StoryRanges(wdFootnotesStory)
Do While .Find.Execute("<[A-Za-z]{1,}> v <[A-Za-z]{1,}>", _
MatchWildcards:=True, _
Wrap:=wdFindStop, Forward:=True) = True
.Font.Italic = True
.Collapse Direction:=wdCollapseEnd
Loop
End With
End Sub

--
Hope this helps,
Pesach Shelnitz


megan said:
I need to create a macro that will italicise all the case names in my
footonotes, the names change, but there is always a v in the middle, eg:
Microsoft v Apple or Dave v Frank, is this possible?

any help much appreciated.
 
M

megan

Hi,

At the end of each case name is a date, so that could be the defning bit for
the end, but the start might be harder as sometimes there will be nothing, as
it is the start of a sentence, and sometimes there will be a semi colon, if
it is in a list. Eg:

Cf. the 1995 Act, Sectionsection 11(2)(c); Morin v Bonhams & Brooks Ltd
[2004] 1 Lloyd's Rep 702

So in this bit, it is Morin v Bonhams & Brooks Ltd that should be italicised.

Does that help at all?

Thanks very much.
Pesach Shelnitz said:
Hi,

You would need some definite criteria to determine whether the preceding
words are part of the name of one side and whether the subsequent words are
part of the name of the other side. Do you have such criteria?
--
Hope this helps,
Pesach Shelnitz


megan said:
Hi,

Thanks for that, it's really clever! Just one thing that i should have
mentioned, the case name lengths vary, so it isn't always one name v another
name, it could be Microsoft plc an others v Allians.

Do you know if it is possible to get the macro to be able to do that still?

Thanks very much

Pesach Shelnitz said:
Hi Megan,

The following macro should do what you want. Note that this macro runs
silently. You will have to look in the footnotes to see the results.

Sub FormatCaseNames()

With ActiveDocument.StoryRanges(wdFootnotesStory)
Do While .Find.Execute("<[A-Za-z]{1,}> v <[A-Za-z]{1,}>", _
MatchWildcards:=True, _
Wrap:=wdFindStop, Forward:=True) = True
.Font.Italic = True
.Collapse Direction:=wdCollapseEnd
Loop
End With
End Sub

--
Hope this helps,
Pesach Shelnitz


:

I need to create a macro that will italicise all the case names in my
footonotes, the names change, but there is always a v in the middle, eg:
Microsoft v Apple or Dave v Frank, is this possible?

any help much appreciated.
 
J

Janine_ribbonspace

Pesach, that is a great little macro - although it does not run in
background (but it will soon ) - I've some examples below.
The start point on left will be a tilde ~ character so the macro can run -
then to clean macro I will run a tilde erase.
The stop point on right side is first softspace and
(
[
~

Is that workable?

Examples below:

Hewsin & Ors v Able Jones Pty Ltd (unreported)
Smithsonian v Joyce [1974] QB 454
GIO of NSW v Planas (1984) 2 NSWLR 671
Griffiths v Kerkemeyeaaar (1973) 139 CLR 161
Hodges v Frost at first instance, (unreported) decision of Kelly J, Supreme
Court, ACT (21 October 1983) No. 799 of 1980
Apples v Frost (1985) 53 ALR 373
Browne v The Commonwealth and Lagozzande (unreported) decision of Males CJ,
Supreme Court, ACT (3 May 1987) No. 441 of 1981
McIntyre v Miller (1979) 30 ACTR 8
Nguyen v Nguyen (1992) 167 CLR 245
Veselinovice v Thorley (1983) 1 Qd R 191
Wanne v Fire and All Risks Insurance Co Ltd (1980) 2 Qd R 592
Watersmaple v Mussigee (1986) 1 Qd R 213

Pesach Shelnitz said:
Hi,

You would need some definite criteria to determine whether the preceding
words are part of the name of one side and whether the subsequent words
are
part of the name of the other side. Do you have such criteria?
--
Hope this helps,
Pesach Shelnitz


megan said:
Hi,

Thanks for that, it's really clever! Just one thing that i should have
mentioned, the case name lengths vary, so it isn't always one name v
another
name, it could be Microsoft plc an others v Allians.

Do you know if it is possible to get the macro to be able to do that
still?

Thanks very much

Pesach Shelnitz said:
Hi Megan,

The following macro should do what you want. Note that this macro runs
silently. You will have to look in the footnotes to see the results.

Sub FormatCaseNames()

With ActiveDocument.StoryRanges(wdFootnotesStory)
Do While .Find.Execute("<[A-Za-z]{1,}> v <[A-Za-z]{1,}>", _
MatchWildcards:=True, _
Wrap:=wdFindStop, Forward:=True) = True
.Font.Italic = True
.Collapse Direction:=wdCollapseEnd
Loop
End With
End Sub

--
Hope this helps,
Pesach Shelnitz


:

I need to create a macro that will italicise all the case names in my
footonotes, the names change, but there is always a v in the middle,
eg:
Microsoft v Apple or Dave v Frank, is this possible?

any help much appreciated.
 
M

megan

Hi Janine,

Thanks for your help on this. would you be able to paste in the code I need
to put in the Macro to run it please?

thanks very much.

Janine_ribbonspace said:
Pesach, that is a great little macro - although it does not run in
background (but it will soon ) - I've some examples below.
The start point on left will be a tilde ~ character so the macro can run -
then to clean macro I will run a tilde erase.
The stop point on right side is first softspace and
(
[
~

Is that workable?

Examples below:

Hewsin & Ors v Able Jones Pty Ltd (unreported)
Smithsonian v Joyce [1974] QB 454
GIO of NSW v Planas (1984) 2 NSWLR 671
Griffiths v Kerkemeyeaaar (1973) 139 CLR 161
Hodges v Frost at first instance, (unreported) decision of Kelly J, Supreme
Court, ACT (21 October 1983) No. 799 of 1980
Apples v Frost (1985) 53 ALR 373
Browne v The Commonwealth and Lagozzande (unreported) decision of Males CJ,
Supreme Court, ACT (3 May 1987) No. 441 of 1981
McIntyre v Miller (1979) 30 ACTR 8
Nguyen v Nguyen (1992) 167 CLR 245
Veselinovice v Thorley (1983) 1 Qd R 191
Wanne v Fire and All Risks Insurance Co Ltd (1980) 2 Qd R 592
Watersmaple v Mussigee (1986) 1 Qd R 213

Pesach Shelnitz said:
Hi,

You would need some definite criteria to determine whether the preceding
words are part of the name of one side and whether the subsequent words
are
part of the name of the other side. Do you have such criteria?
--
Hope this helps,
Pesach Shelnitz


megan said:
Hi,

Thanks for that, it's really clever! Just one thing that i should have
mentioned, the case name lengths vary, so it isn't always one name v
another
name, it could be Microsoft plc an others v Allians.

Do you know if it is possible to get the macro to be able to do that
still?

Thanks very much

:

Hi Megan,

The following macro should do what you want. Note that this macro runs
silently. You will have to look in the footnotes to see the results.

Sub FormatCaseNames()

With ActiveDocument.StoryRanges(wdFootnotesStory)
Do While .Find.Execute("<[A-Za-z]{1,}> v <[A-Za-z]{1,}>", _
MatchWildcards:=True, _
Wrap:=wdFindStop, Forward:=True) = True
.Font.Italic = True
.Collapse Direction:=wdCollapseEnd
Loop
End With
End Sub

--
Hope this helps,
Pesach Shelnitz


:

I need to create a macro that will italicise all the case names in my
footonotes, the names change, but there is always a v in the middle,
eg:
Microsoft v Apple or Dave v Frank, is this possible?

any help much appreciated.
 
P

Pesach Shelnitz

Hi,

The following modified version of my original macro will get it right in all
the cases that you and Janine listed except for "Hodges v Frost at first
instance, (unreported) decision of Kelly J, Supreme". In this case it will
italicize "at first instance,".

Sub FormatCaseNames()

Dim myRange As Range
Dim pos As Integer

With ActiveDocument.StoryRanges(wdFootnotesStory)
Do While .Find.Execute("<[A-Za-z]{1,}> v <[A-Za-z]{1,}>", _
MatchWildcards:=True, _
Wrap:=wdFindStop, Forward:=True) = True
Set myRange = .Footnotes(1).Range
pos = InStr(.End - myRange.start, myRange.Text, "(",
vbTextCompare)
If pos > 0 Then
.End = myRange.start + pos - 2
Else
pos = InStr(.End - myRange.start, myRange.Text, "[",
vbTextCompare)
If pos > 0 Then
.End = myRange.start + pos - 2
End If
End If
myRange.End = .start
pos = InStrRev(myRange.Text, ";", -1, vbTextCompare)
.start = myRange.start
If pos > 0 Then
.start = .start + pos + 1
End If
.Font.Italic = True
.Collapse Direction:=wdCollapseEnd
Loop
End With
Set myRange = Nothing
End Sub

--
Hope this helps,
Pesach Shelnitz


megan said:
Hi Janine,

Thanks for your help on this. would you be able to paste in the code I need
to put in the Macro to run it please?

thanks very much.

Janine_ribbonspace said:
Pesach, that is a great little macro - although it does not run in
background (but it will soon ) - I've some examples below.
The start point on left will be a tilde ~ character so the macro can run -
then to clean macro I will run a tilde erase.
The stop point on right side is first softspace and
(
[
~

Is that workable?

Examples below:

Hewsin & Ors v Able Jones Pty Ltd (unreported)
Smithsonian v Joyce [1974] QB 454
GIO of NSW v Planas (1984) 2 NSWLR 671
Griffiths v Kerkemeyeaaar (1973) 139 CLR 161
Hodges v Frost at first instance, (unreported) decision of Kelly J, Supreme
Court, ACT (21 October 1983) No. 799 of 1980
Apples v Frost (1985) 53 ALR 373
Browne v The Commonwealth and Lagozzande (unreported) decision of Males CJ,
Supreme Court, ACT (3 May 1987) No. 441 of 1981
McIntyre v Miller (1979) 30 ACTR 8
Nguyen v Nguyen (1992) 167 CLR 245
Veselinovice v Thorley (1983) 1 Qd R 191
Wanne v Fire and All Risks Insurance Co Ltd (1980) 2 Qd R 592
Watersmaple v Mussigee (1986) 1 Qd R 213

Pesach Shelnitz said:
Hi,

You would need some definite criteria to determine whether the preceding
words are part of the name of one side and whether the subsequent words
are
part of the name of the other side. Do you have such criteria?
--
Hope this helps,
Pesach Shelnitz


:

Hi,

Thanks for that, it's really clever! Just one thing that i should have
mentioned, the case name lengths vary, so it isn't always one name v
another
name, it could be Microsoft plc an others v Allians.

Do you know if it is possible to get the macro to be able to do that
still?

Thanks very much

:

Hi Megan,

The following macro should do what you want. Note that this macro runs
silently. You will have to look in the footnotes to see the results.

Sub FormatCaseNames()

With ActiveDocument.StoryRanges(wdFootnotesStory)
Do While .Find.Execute("<[A-Za-z]{1,}> v <[A-Za-z]{1,}>", _
MatchWildcards:=True, _
Wrap:=wdFindStop, Forward:=True) = True
.Font.Italic = True
.Collapse Direction:=wdCollapseEnd
Loop
End With
End Sub

--
Hope this helps,
Pesach Shelnitz


:

I need to create a macro that will italicise all the case names in my
footonotes, the names change, but there is always a v in the middle,
eg:
Microsoft v Apple or Dave v Frank, is this possible?

any help much appreciated.
 
M

megan

Hi,

thanks very much for writing this. Unfortunately it is coming up with a
couple of errors when i run it, it says, syntax error and can't excecute in
break mode.

Do you know what the problem might be?

Thanks,

Megan

Pesach Shelnitz said:
Hi,

The following modified version of my original macro will get it right in all
the cases that you and Janine listed except for "Hodges v Frost at first
instance, (unreported) decision of Kelly J, Supreme". In this case it will
italicize "at first instance,".

Sub FormatCaseNames()

Dim myRange As Range
Dim pos As Integer

With ActiveDocument.StoryRanges(wdFootnotesStory)
Do While .Find.Execute("<[A-Za-z]{1,}> v <[A-Za-z]{1,}>", _
MatchWildcards:=True, _
Wrap:=wdFindStop, Forward:=True) = True
Set myRange = .Footnotes(1).Range
pos = InStr(.End - myRange.start, myRange.Text, "(",
vbTextCompare)
If pos > 0 Then
.End = myRange.start + pos - 2
Else
pos = InStr(.End - myRange.start, myRange.Text, "[",
vbTextCompare)
If pos > 0 Then
.End = myRange.start + pos - 2
End If
End If
myRange.End = .start
pos = InStrRev(myRange.Text, ";", -1, vbTextCompare)
.start = myRange.start
If pos > 0 Then
.start = .start + pos + 1
End If
.Font.Italic = True
.Collapse Direction:=wdCollapseEnd
Loop
End With
Set myRange = Nothing
End Sub

--
Hope this helps,
Pesach Shelnitz


megan said:
Hi Janine,

Thanks for your help on this. would you be able to paste in the code I need
to put in the Macro to run it please?

thanks very much.

Janine_ribbonspace said:
Pesach, that is a great little macro - although it does not run in
background (but it will soon ) - I've some examples below.
The start point on left will be a tilde ~ character so the macro can run -
then to clean macro I will run a tilde erase.
The stop point on right side is first softspace and
(
[
~

Is that workable?

Examples below:

Hewsin & Ors v Able Jones Pty Ltd (unreported)
Smithsonian v Joyce [1974] QB 454
GIO of NSW v Planas (1984) 2 NSWLR 671
Griffiths v Kerkemeyeaaar (1973) 139 CLR 161
Hodges v Frost at first instance, (unreported) decision of Kelly J, Supreme
Court, ACT (21 October 1983) No. 799 of 1980
Apples v Frost (1985) 53 ALR 373
Browne v The Commonwealth and Lagozzande (unreported) decision of Males CJ,
Supreme Court, ACT (3 May 1987) No. 441 of 1981
McIntyre v Miller (1979) 30 ACTR 8
Nguyen v Nguyen (1992) 167 CLR 245
Veselinovice v Thorley (1983) 1 Qd R 191
Wanne v Fire and All Risks Insurance Co Ltd (1980) 2 Qd R 592
Watersmaple v Mussigee (1986) 1 Qd R 213

"Pesach Shelnitz" <pesach18(AT)hotmail.com> wrote in message
Hi,

You would need some definite criteria to determine whether the preceding
words are part of the name of one side and whether the subsequent words
are
part of the name of the other side. Do you have such criteria?
--
Hope this helps,
Pesach Shelnitz


:

Hi,

Thanks for that, it's really clever! Just one thing that i should have
mentioned, the case name lengths vary, so it isn't always one name v
another
name, it could be Microsoft plc an others v Allians.

Do you know if it is possible to get the macro to be able to do that
still?

Thanks very much

:

Hi Megan,

The following macro should do what you want. Note that this macro runs
silently. You will have to look in the footnotes to see the results.

Sub FormatCaseNames()

With ActiveDocument.StoryRanges(wdFootnotesStory)
Do While .Find.Execute("<[A-Za-z]{1,}> v <[A-Za-z]{1,}>", _
MatchWildcards:=True, _
Wrap:=wdFindStop, Forward:=True) = True
.Font.Italic = True
.Collapse Direction:=wdCollapseEnd
Loop
End With
End Sub

--
Hope this helps,
Pesach Shelnitz


:

I need to create a macro that will italicise all the case names in my
footonotes, the names change, but there is always a v in the middle,
eg:
Microsoft v Apple or Dave v Frank, is this possible?

any help much appreciated.
 
J

Janine_ribbonspace

Pesach, thank you that works perfectly.

Pesach Shelnitz said:
Hi,

The following modified version of my original macro will get it right in
all
the cases that you and Janine listed except for "Hodges v Frost at first
instance, (unreported) decision of Kelly J, Supreme". In this case it will
italicize "at first instance,".

Sub FormatCaseNames()

Dim myRange As Range
Dim pos As Integer

With ActiveDocument.StoryRanges(wdFootnotesStory)
Do While .Find.Execute("<[A-Za-z]{1,}> v <[A-Za-z]{1,}>", _
MatchWildcards:=True, _
Wrap:=wdFindStop, Forward:=True) = True
Set myRange = .Footnotes(1).Range
pos = InStr(.End - myRange.start, myRange.Text, "(",
vbTextCompare)
If pos > 0 Then
.End = myRange.start + pos - 2
Else
pos = InStr(.End - myRange.start, myRange.Text, "[",
vbTextCompare)
If pos > 0 Then
.End = myRange.start + pos - 2
End If
End If
myRange.End = .start
pos = InStrRev(myRange.Text, ";", -1, vbTextCompare)
.start = myRange.start
If pos > 0 Then
.start = .start + pos + 1
End If
.Font.Italic = True
.Collapse Direction:=wdCollapseEnd
Loop
End With
Set myRange = Nothing
End Sub

--
Hope this helps,
Pesach Shelnitz


megan said:
Hi Janine,

Thanks for your help on this. would you be able to paste in the code I
need
to put in the Macro to run it please?

thanks very much.

Janine_ribbonspace said:
Pesach, that is a great little macro - although it does not run in
background (but it will soon ) - I've some examples below.
The start point on left will be a tilde ~ character so the macro can
run -
then to clean macro I will run a tilde erase.
The stop point on right side is first softspace and
(
[
~

Is that workable?

Examples below:

Hewsin & Ors v Able Jones Pty Ltd (unreported)
Smithsonian v Joyce [1974] QB 454
GIO of NSW v Planas (1984) 2 NSWLR 671
Griffiths v Kerkemeyeaaar (1973) 139 CLR 161
Hodges v Frost at first instance, (unreported) decision of Kelly J,
Supreme
Court, ACT (21 October 1983) No. 799 of 1980
Apples v Frost (1985) 53 ALR 373
Browne v The Commonwealth and Lagozzande (unreported) decision of Males
CJ,
Supreme Court, ACT (3 May 1987) No. 441 of 1981
McIntyre v Miller (1979) 30 ACTR 8
Nguyen v Nguyen (1992) 167 CLR 245
Veselinovice v Thorley (1983) 1 Qd R 191
Wanne v Fire and All Risks Insurance Co Ltd (1980) 2 Qd R 592
Watersmaple v Mussigee (1986) 1 Qd R 213

"Pesach Shelnitz" <pesach18(AT)hotmail.com> wrote in message
Hi,

You would need some definite criteria to determine whether the
preceding
words are part of the name of one side and whether the subsequent
words
are
part of the name of the other side. Do you have such criteria?
--
Hope this helps,
Pesach Shelnitz


:

Hi,

Thanks for that, it's really clever! Just one thing that i should
have
mentioned, the case name lengths vary, so it isn't always one name v
another
name, it could be Microsoft plc an others v Allians.

Do you know if it is possible to get the macro to be able to do that
still?

Thanks very much

:

Hi Megan,

The following macro should do what you want. Note that this macro
runs
silently. You will have to look in the footnotes to see the
results.

Sub FormatCaseNames()

With ActiveDocument.StoryRanges(wdFootnotesStory)
Do While .Find.Execute("<[A-Za-z]{1,}> v <[A-Za-z]{1,}>",
_
MatchWildcards:=True, _
Wrap:=wdFindStop, Forward:=True) = True
.Font.Italic = True
.Collapse Direction:=wdCollapseEnd
Loop
End With
End Sub

--
Hope this helps,
Pesach Shelnitz


:

I need to create a macro that will italicise all the case names
in my
footonotes, the names change, but there is always a v in the
middle,
eg:
Microsoft v Apple or Dave v Frank, is this possible?

any help much appreciated.
 
P

Pesach Shelnitz

Hi Megan,

I copied it back out of the post, and I see that there are lines that have
become broken over two lines because of the narrow width of the posting area.
Here is a corrected version that should not have this problem. To get out of
break mode, in the VB Editor, on the run menu, click Rest.

Sub FormatCaseNames()

Dim myRange As Range
Dim pos As Integer

With ActiveDocument.StoryRanges(wdFootnotesStory)
Do While .Find.Execute("<[A-Za-z]{1,}> v <[A-Za-z]{1,}>", _
MatchWildcards:=True, _
Wrap:=wdFindStop, Forward:=True) = True
Set myRange = .Footnotes(1).Range
pos = InStr(.End - myRange.start, myRange.Text, _
"(", vbTextCompare)
If pos > 0 Then
.End = myRange.start + pos - 2
Else
pos = InStr(.End - myRange.start, myRange.Text, _
"[", vbTextCompare)
If pos > 0 Then
.End = myRange.start + pos - 2
End If
End If
myRange.End = .start
pos = InStrRev(myRange.Text, ";", -1, vbTextCompare)
.start = myRange.start
If pos > 0 Then
.start = .start + pos + 1
End If
.Font.Italic = True
.Collapse Direction:=wdCollapseEnd
Loop
End With
Set myRange = Nothing
End Sub

--
Hope this helps,
Pesach Shelnitz


megan said:
Hi,

thanks very much for writing this. Unfortunately it is coming up with a
couple of errors when i run it, it says, syntax error and can't excecute in
break mode.

Do you know what the problem might be?

Thanks,

Megan

Pesach Shelnitz said:
Hi,

The following modified version of my original macro will get it right in all
the cases that you and Janine listed except for "Hodges v Frost at first
instance, (unreported) decision of Kelly J, Supreme". In this case it will
italicize "at first instance,".

Sub FormatCaseNames()

Dim myRange As Range
Dim pos As Integer

With ActiveDocument.StoryRanges(wdFootnotesStory)
Do While .Find.Execute("<[A-Za-z]{1,}> v <[A-Za-z]{1,}>", _
MatchWildcards:=True, _
Wrap:=wdFindStop, Forward:=True) = True
Set myRange = .Footnotes(1).Range
pos = InStr(.End - myRange.start, myRange.Text, "(",
vbTextCompare)
If pos > 0 Then
.End = myRange.start + pos - 2
Else
pos = InStr(.End - myRange.start, myRange.Text, "[",
vbTextCompare)
If pos > 0 Then
.End = myRange.start + pos - 2
End If
End If
myRange.End = .start
pos = InStrRev(myRange.Text, ";", -1, vbTextCompare)
.start = myRange.start
If pos > 0 Then
.start = .start + pos + 1
End If
.Font.Italic = True
.Collapse Direction:=wdCollapseEnd
Loop
End With
Set myRange = Nothing
End Sub

--
Hope this helps,
Pesach Shelnitz


megan said:
Hi Janine,

Thanks for your help on this. would you be able to paste in the code I need
to put in the Macro to run it please?

thanks very much.

:

Pesach, that is a great little macro - although it does not run in
background (but it will soon ) - I've some examples below.
The start point on left will be a tilde ~ character so the macro can run -
then to clean macro I will run a tilde erase.
The stop point on right side is first softspace and
(
[
~

Is that workable?

Examples below:

Hewsin & Ors v Able Jones Pty Ltd (unreported)
Smithsonian v Joyce [1974] QB 454
GIO of NSW v Planas (1984) 2 NSWLR 671
Griffiths v Kerkemeyeaaar (1973) 139 CLR 161
Hodges v Frost at first instance, (unreported) decision of Kelly J, Supreme
Court, ACT (21 October 1983) No. 799 of 1980
Apples v Frost (1985) 53 ALR 373
Browne v The Commonwealth and Lagozzande (unreported) decision of Males CJ,
Supreme Court, ACT (3 May 1987) No. 441 of 1981
McIntyre v Miller (1979) 30 ACTR 8
Nguyen v Nguyen (1992) 167 CLR 245
Veselinovice v Thorley (1983) 1 Qd R 191
Wanne v Fire and All Risks Insurance Co Ltd (1980) 2 Qd R 592
Watersmaple v Mussigee (1986) 1 Qd R 213

"Pesach Shelnitz" <pesach18(AT)hotmail.com> wrote in message
Hi,

You would need some definite criteria to determine whether the preceding
words are part of the name of one side and whether the subsequent words
are
part of the name of the other side. Do you have such criteria?
--
Hope this helps,
Pesach Shelnitz


:

Hi,

Thanks for that, it's really clever! Just one thing that i should have
mentioned, the case name lengths vary, so it isn't always one name v
another
name, it could be Microsoft plc an others v Allians.

Do you know if it is possible to get the macro to be able to do that
still?

Thanks very much

:

Hi Megan,

The following macro should do what you want. Note that this macro runs
silently. You will have to look in the footnotes to see the results.

Sub FormatCaseNames()

With ActiveDocument.StoryRanges(wdFootnotesStory)
Do While .Find.Execute("<[A-Za-z]{1,}> v <[A-Za-z]{1,}>", _
MatchWildcards:=True, _
Wrap:=wdFindStop, Forward:=True) = True
.Font.Italic = True
.Collapse Direction:=wdCollapseEnd
Loop
End With
End Sub

--
Hope this helps,
Pesach Shelnitz


:

I need to create a macro that will italicise all the case names in my
footonotes, the names change, but there is always a v in the middle,
eg:
Microsoft v Apple or Dave v Frank, is this possible?

any help much appreciated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top