D
dvbrook
I am attempting to add a button to a template that will allow users to
basically skip down a line from where there cursor is placed. Tnis will
allow inserting a new row for a table entry. The problem appears that since
there is not a reference statemend like "end" to go to the end of the
document, when the macro is initiated via a button, the cursor moves to the
area just under the buttons.
I have tried various statements to go to the end of the paragraph
(Selection.MoveEnd Unit:=wdParagraph), etc. in the macro, but nothing works I
have found.
The macro does work when it is activated by using the run command on the
tool bar, so I am confident it has something to do with the button click.
Interestingly, the other buttons for adding a new table and line item entry
to the table work fine, but those always default to the end of the document.
The base line space macro is as follows:
Private Sub LineSpc_Click()
Selection.MoveDown Unit:=wdLine, Count:=1
End Sub
Note that the base command: Selection.MoveDown Unit:=wdLine, Count:=1 works
when the macro is run from the toolbar and not the button.
Any suggestions would be helpful.
Thanks,
Don
basically skip down a line from where there cursor is placed. Tnis will
allow inserting a new row for a table entry. The problem appears that since
there is not a reference statemend like "end" to go to the end of the
document, when the macro is initiated via a button, the cursor moves to the
area just under the buttons.
I have tried various statements to go to the end of the paragraph
(Selection.MoveEnd Unit:=wdParagraph), etc. in the macro, but nothing works I
have found.
The macro does work when it is activated by using the run command on the
tool bar, so I am confident it has something to do with the button click.
Interestingly, the other buttons for adding a new table and line item entry
to the table work fine, but those always default to the end of the document.
The base line space macro is as follows:
Private Sub LineSpc_Click()
Selection.MoveDown Unit:=wdLine, Count:=1
End Sub
Note that the base command: Selection.MoveDown Unit:=wdLine, Count:=1 works
when the macro is run from the toolbar and not the button.
Any suggestions would be helpful.
Thanks,
Don