N
Nexan
I'm trying to set up a macro to sort groups of paragraphs that repeat as
shown below:
DATE: XXXXXXX
PHONE: XXXXXXX
CALL CENTER: XXXXXXX
ACCOUNT: XXXXXXX
ORG NAME: XXXXXXX
REASON TO CALL FROM SAMPLE: XXXXXXX
REASON TO CALL FROM CUSTOMER: XXXXXXX
CONTACT NUMBER: XXXXXXX
TIME TO CALL: XXXXXXX
COMPANY PHONE: XXXXXXX
NAME: Jane Doe
ISSUE IN DETAIL: XXXXXXX
SPECIAL: XXXXXXX
DATE: XXXXXXX
PHONE: XXXXXXX
CALL CENTER: XXXXXXX
ACCOUNT: XXXXXXX
ORG NAME: XXXXXXX
REASON TO CALL FROM SAMPLE: XXXXXXX
REASON TO CALL FROM CUSTOMER: XXXXXXX
CONTACT NUMBER: XXXXXXX
TIME TO CALL: XXXXXXX
COMPANY PHONE: XXXXXXX
NAME: Joe Blow
ISSUE IN DETAIL: XXXXXXX
SPECIAL: XXXXXXX
I'm trying to use the following formula:
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.Text = "(ORG NAME:*^13REASON TO CALL FROM SAMPLE:*^13REASON TO CALL
FROM CUSTOMER:*^13CONTACT NUMBER:^13TIME TO CALL:*^13COMPANY
PHONE:*^13)(NAME:*^13)"
.Replacement.Text = "\2\1"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = True
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
All I'm trying to do is move "NAME:" up before "ORG NAME:". However, when I
use this formula, it moves both the first -and- the last instance of "NAME:"
in the document above the first instance of "ORG NAME:". Is there any way to
avoid this?
Thanks!
shown below:
DATE: XXXXXXX
PHONE: XXXXXXX
CALL CENTER: XXXXXXX
ACCOUNT: XXXXXXX
ORG NAME: XXXXXXX
REASON TO CALL FROM SAMPLE: XXXXXXX
REASON TO CALL FROM CUSTOMER: XXXXXXX
CONTACT NUMBER: XXXXXXX
TIME TO CALL: XXXXXXX
COMPANY PHONE: XXXXXXX
NAME: Jane Doe
ISSUE IN DETAIL: XXXXXXX
SPECIAL: XXXXXXX
DATE: XXXXXXX
PHONE: XXXXXXX
CALL CENTER: XXXXXXX
ACCOUNT: XXXXXXX
ORG NAME: XXXXXXX
REASON TO CALL FROM SAMPLE: XXXXXXX
REASON TO CALL FROM CUSTOMER: XXXXXXX
CONTACT NUMBER: XXXXXXX
TIME TO CALL: XXXXXXX
COMPANY PHONE: XXXXXXX
NAME: Joe Blow
ISSUE IN DETAIL: XXXXXXX
SPECIAL: XXXXXXX
I'm trying to use the following formula:
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.Text = "(ORG NAME:*^13REASON TO CALL FROM SAMPLE:*^13REASON TO CALL
FROM CUSTOMER:*^13CONTACT NUMBER:^13TIME TO CALL:*^13COMPANY
PHONE:*^13)(NAME:*^13)"
.Replacement.Text = "\2\1"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = True
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
All I'm trying to do is move "NAME:" up before "ORG NAME:". However, when I
use this formula, it moves both the first -and- the last instance of "NAME:"
in the document above the first instance of "ORG NAME:". Is there any way to
avoid this?
Thanks!