Language to insert text

S

Sue

For ease of reference:
Text Box = Insert | TextBox in Document
TextBox = Macro TextBox
I have a template I am creating using a Text Box for
placement of information in a document. Inside the MS
Word 2000 Text Box I have bookmarks so information from
the macro can be inserted. The problem is that I need
language to open the Text Box so the macro can enter the
user's information from the macro TextBox.

Private Sub cmdOK_Click()

With ActiveDocument
.Bookmarks(bmkAtty).Range.InsertAfter Me.txtName
.Bookmarks(bmkTitle).Range.InsertAfter Me.txtTitle
.Bookmarks(bmkEmail).Range.InsertAfter Me.txtEmail
.Bookmarks(bmkDirectDial).Range.InsertAfter
Me.txtDirectDial
End With
Dim aBmk As Bookmark
For Each aBmk In ActiveDocument.Bookmarks
ActiveDocument.Bookmarks(aBmk).Delete
Next
Unload Me
Set frmNewLetter = Nothing

End Sub

Any help will be greatly appreciated.
 
D

Doug Robbins - Word MVP

See the article "How to create a Userform" at:

http://word.mvps.org/FAQs/Userforms/CreateAUserForm.htm


--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top