TonyD Newbie
Joined: 18 Feb 2004 Posts: 3
|
Posted: Feb 18th, 2004 09:45 AM Post subject: VBA Word Template - Word 2000 |
|
|
Hiya,
I have written a word template which works okay. I am now adding code to the Open Event but I'm experiencing a few problems. Below is the code I have written:
Dim oform As frmletter
Set frmletter = oform
If oform.cmdok = True Then
oform.txt10.Text = Format$(Date, "d mmmm yyyy")
oform.txt1.Text = ActiveDocument.Bookmarks("To").Range
oform.txt2.Text = ActiveDocument.Bookmarks("Address")
oform.txt8.Text = ActiveDocument.Bookmarks("yourref")
oform.txt9.Text = ActiveDocument.Bookmarks("ourref")
End If
oform.Show
I am trying to get the letter details such as address and name etc to load back into the userform so I can make admendments to these, the template is then updated with these amendments, is there a way to do this?
I am very new to VBA so if my code is complately wrong feel free to completely modify...
Thank you very much,
TonyD |
|