这种情况下,根本不需要使用书签,直接使用RANGE对象就可以了。
请参:
AlPSqv6R.zip
(7.12 KB, 下载次数: 20)
这是其中的部分代码:
'* +++++++++++++++++++++++++++++
'* Created By I Love You_Word!@ExcelHome 2005-4-5 04:39:02
'仅测试于System: Windows NT Word: 10.0 Language: 2052
'^The Code CopyIn [用户窗体-UserForm1]^'
'* -----------------------------
Private Sub CommandButton1_Click()
Dim MyRange As Range
With ActiveDocument
Set MyRange = .Range(8, .Paragraphs(1).Range.End)
MyRange.Text = Me.TextBox1
Me.TextBox1 = ""
Me.TextBox1.SetFocus
End With
End Sub
'----------------------
Private Sub UserForm_Activate()
Me.TextBox1.SetFocus
Me.CommandButton1.Default = True
End Sub
'----------------------
|