Hi!
Though I've made a couple of attempts at this, I have yet to figure out how
to create a macro that does the following.
1. Determine the style of the paragraph in which the cursor is sitting.
2. Compare the style determined in step 1 to a short list of style names. If
the style = A, change the style of the paragraph in which the cursor is
sitting to A1;if the style = B, change to B1, and so on.
3. If the style is not equal to one that is on the list, return an error
message.
ANybody have something liek this I can look at or some suggestions about how
to create this macro?
Thanks!
Beth
Doug Robbins - Word MVP - 10 Feb 2006 19:16 GMT
If the list is not too long, you could use something like
Dim stylename As String
With Selection.Paragraphs(1)
stylename = .Style
If stylename = "A" Then
.Style = "A1"
ElseIf stylename = "B" Then
.Style = "B1"
Else
MsgBox "Style not in List"
End If
End With

Signature
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP
> Hi!
>
[quoted text clipped - 17 lines]
>
> Beth
Beth Brooks - 10 Feb 2006 20:47 GMT
Doug,
That worked like a charm. Thanks!
Beth