Creating

C

C Stanley

I'm trying to create a standard letter that staff here can
use to feed back to GP's re. patients. I want to make it
easy to fill in the data, preferably by using pop up boxes
that tell the user what kind of information to enter.

In my previous job, offers of employment letters were
created in this way, but I cannot remember how they were
done as these were in place before I arrived there.

I am using a pc, Windows 2000 and Word 2000 (9.0 6926 SP-
3)

Any help or pointers much appreciated.

Regards,

Christine Stanley
 
D

Doug Robbins - Word MVP

Hi Christine,

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

http://www.mvps.org/word/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
 
C

CStanley

Doug, many thanks for your reply - the article is a big
help.

However, I think I need to ask for more specific help if I
may.

I have got so far, and then come unstuck at the point
where I enter the code for the command button.

The code I am entering is below - though please note that
the lines containing the word 'label'are already present
in the code window and I have no idea what to put for
those.

When I try to create a new document from the saved
template I only get a document with all the bookmarks in
it.

The code I entered for command button is:


Private Sub CommandButton1_Click()
With ActiveDocument
.Bookmarks("addressee").Range _
.InsertBefore TextBox1
.Bookmarks("add1").Range _
.InsertBefore TextBox2
.Bookmarks("add2").Range _
.InsertBefore TextBox3
.Bookmarks("add3").Range _
.InsertBefore TextBox4
.Bookmarks("add4").Range _
.InsertBefore TextBox5
.Bookmarks("pcode").Range _
.InsertBefore TextBox6
.Bookmarks("letterdate").Range _
.InsertBefore TextBox7
.Bookmarks("name").Range _
.InsertBefore TextBox8
.Bookmarks("patient").Range _
.InsertBefore TextBox9
.Bookmarks("dob").Range _
.InsertBefore TextBox10
.Bookmarks("a1").Range _
.InsertBefore TextBox11
.Bookmarks("a2").Range _
.InsertBefore TextBox12
.Bookmarks("a3").Range _
.InsertBefore TextBox13
.Bookmarks("pc").Range _
.InsertBefore TextBox14
.Bookmarks("service").Range _
.InsertBefore TextBox15
.Bookmarks("refdate").Range _
.InsertBefore TextBox16
.Bookmarks("refreason").Range _
.InsertBefore TextBox17
.Bookmarks("outcome").Range _
.InsertBefore TextBox18

End With

UserForm1.Hide

End Sub

Private Sub Label14_Click()

End Sub

Private Sub Label2_Click()

End Sub
 

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