A
Aaron
Hello,
Thank you in advance to the respondent.
What I am doing: A form has checkboxes for items on a
report / headings with a bullet under it. The headings
relating to the checked boxes will be deleted.
The code using .goto works great for the first page and I
have figured out how to get the second page... however
when using wdGotoAbsolute, wdGotoFirst what happens is it
jumps back to the first page. When using wdGotoRelative
it only will work on one item since that item becomes the
relative position, the rest will not work.
Here is the code, one using abosolute and the other not.
My question is how do I get this code to work on the
second page.
..GoTo What:=wdGoToPage, Which:=wdGoToAbsolute, Count:=2
If chkPFacility.Value = True Then
MsgBox ("Facility if statement")
.GoTo What:=wdGoToLine, Which:=wdGoToAbsolute,
Count:=6
.ExtendMode = True
.MoveDown Unit:=wdLine, Count:=3
'.Delete
.ExtendMode = False
End If
If chkPGenBus.Value = True Then
MsgBox ("GenBus if statement")
.GoTo What:=wdGoToLine, Which:=wdGoToRelative,
Count:=3
.ExtendMode = True
.MoveDown Unit:=wdLine, Count:=3
'.Delete
.ExtendMode = False
End If
Aaron
Thank you in advance to the respondent.
What I am doing: A form has checkboxes for items on a
report / headings with a bullet under it. The headings
relating to the checked boxes will be deleted.
The code using .goto works great for the first page and I
have figured out how to get the second page... however
when using wdGotoAbsolute, wdGotoFirst what happens is it
jumps back to the first page. When using wdGotoRelative
it only will work on one item since that item becomes the
relative position, the rest will not work.
Here is the code, one using abosolute and the other not.
My question is how do I get this code to work on the
second page.
..GoTo What:=wdGoToPage, Which:=wdGoToAbsolute, Count:=2
If chkPFacility.Value = True Then
MsgBox ("Facility if statement")
.GoTo What:=wdGoToLine, Which:=wdGoToAbsolute,
Count:=6
.ExtendMode = True
.MoveDown Unit:=wdLine, Count:=3
'.Delete
.ExtendMode = False
End If
If chkPGenBus.Value = True Then
MsgBox ("GenBus if statement")
.GoTo What:=wdGoToLine, Which:=wdGoToRelative,
Count:=3
.ExtendMode = True
.MoveDown Unit:=wdLine, Count:=3
'.Delete
.ExtendMode = False
End If
Aaron