A
Angie M.
Hello,
I'm using Word 2003. I have two macros, both copy the styles from one
template into the current document and then one of the macros makes the
styles fully justified. They are part of a form so they run conditionally
when the user clicks OK. Problem is, I can't get just the first macro to
run, it always runs the MakeFull part of it, so no matter what I get full
alignment. After reading VBA help I tried switching statements after "then"
to the next line but I'm not having success. Any help would be appreciated!
Sub btnOK_Click()
If opt1 Then
Call NumOut1
End If
If opt1 And optFull Then
Call NumOut1
Call MakeFull
End If
The macros that are being called don't seem to be the problem but here they
are:
Sub NumOut1()
ActiveDocument.CopyStylesFromTemplate Template:= _
"c:\Numbering\Style Sheets\#1 Style Sheet.dot"
CommandBars("Numbering and Styles").Visible = True
End Sub
Sub MakeFull()
With ActiveDocument
.Styles("BodyTextDbl").ParagraphFormat.Alignment = wdAlignParagraphJustify
.Styles("Normal").ParagraphFormat.Alignment = wdAlignParagraphJustify
end with
end sub
THANKS
I'm using Word 2003. I have two macros, both copy the styles from one
template into the current document and then one of the macros makes the
styles fully justified. They are part of a form so they run conditionally
when the user clicks OK. Problem is, I can't get just the first macro to
run, it always runs the MakeFull part of it, so no matter what I get full
alignment. After reading VBA help I tried switching statements after "then"
to the next line but I'm not having success. Any help would be appreciated!
Sub btnOK_Click()
If opt1 Then
Call NumOut1
End If
If opt1 And optFull Then
Call NumOut1
Call MakeFull
End If
The macros that are being called don't seem to be the problem but here they
are:
Sub NumOut1()
ActiveDocument.CopyStylesFromTemplate Template:= _
"c:\Numbering\Style Sheets\#1 Style Sheet.dot"
CommandBars("Numbering and Styles").Visible = True
End Sub
Sub MakeFull()
With ActiveDocument
.Styles("BodyTextDbl").ParagraphFormat.Alignment = wdAlignParagraphJustify
.Styles("Normal").ParagraphFormat.Alignment = wdAlignParagraphJustify
end with
end sub
THANKS