Log inUsernamePassword
Log me on automatically each visit    
Register
Register
Log in to check your private messages
Log in to check your private messages
Visual Basic Forum for Visual Basic Programmers VB Forum Index » Visual Basic for Applications

Post new topic   Reply to topic
VBA Word Template - Word 2000
View previous topic :: View next topic  
Author Message
TonyD
Newbie


Joined: 18 Feb 2004
Posts: 3

PostPosted: Feb 18th, 2004 09:45 AM    Post subject: VBA Word Template - Word 2000 Reply with quote

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
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Visual Basic Forum for Visual Basic Programmers VB Forum Index » Visual Basic for Applications All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Visual Basic Forum runs phpBB | Forum Template © iOptional
VB Resources | SSL | Visual Basic