C
call_me_sol
HI -
I created a text box. The box accepts input from users. Upon hitting
the "paste" button, the text box replaces specific bookmarks within a
document. After hitting paste, the text box closes.
I need to change the behavior of the text box so that upon hitting the
"paste" button, the test box goes to the background and the document
comes to the foreground becoming active. This will allow users to copy/
paste the contents of the document to be used elsewhere. After users
have finished using the document, I need them to be able to return to
the text box (ideally, just clicking on it because it'll be in the
background) and starting the process over again (I added a "clear"
button to the text box already).
Is this possible?
Here is my current code:
Private Sub CommandButton1_Click()
Dim oRng As Word.Range
Dim oBMs As Bookmarks
Set oBMs = ActiveDocument.Bookmarks
Set oRng = oBMs("RD").Range
oRng.Text = TextBox1
oBMs.Add "RD", oRng
Set oRng = Nothing
Set oBMs = Nothing
Unload Me
End Sub
Private Sub CommandButton2_Click()
TextBox1 = ""
TextBox2 = ""
TextBox3 = ""
TextBox4 = ""
End Sub
Thank you for your help.
I created a text box. The box accepts input from users. Upon hitting
the "paste" button, the text box replaces specific bookmarks within a
document. After hitting paste, the text box closes.
I need to change the behavior of the text box so that upon hitting the
"paste" button, the test box goes to the background and the document
comes to the foreground becoming active. This will allow users to copy/
paste the contents of the document to be used elsewhere. After users
have finished using the document, I need them to be able to return to
the text box (ideally, just clicking on it because it'll be in the
background) and starting the process over again (I added a "clear"
button to the text box already).
Is this possible?
Here is my current code:
Private Sub CommandButton1_Click()
Dim oRng As Word.Range
Dim oBMs As Bookmarks
Set oBMs = ActiveDocument.Bookmarks
Set oRng = oBMs("RD").Range
oRng.Text = TextBox1
oBMs.Add "RD", oRng
Set oRng = Nothing
Set oBMs = Nothing
Unload Me
End Sub
Private Sub CommandButton2_Click()
TextBox1 = ""
TextBox2 = ""
TextBox3 = ""
TextBox4 = ""
End Sub
Thank you for your help.