|
-
Jan 9th, 2002, 08:31 AM
#1
Thread Starter
New Member
Help!!!
Hi
I am a total VB novice and am just starting to learn how to use it and thought this might be a good place to start to get some help!
I need to create a button on an MS Access form that will launch Word, open a blank doc, copy some of the information into the new document for the selected Access Record and then save this document with a filename that's built up from certain fields in the database.
Does this make sense??? If so, does anyone know how to script it???
Thanks v much
-
Jan 9th, 2002, 08:33 AM
#2
To start, Use Shell command to launch Word
-
Jan 9th, 2002, 08:48 AM
#3
Thread Starter
New Member
OK. That's launching Word. What next???
-
Jan 9th, 2002, 09:19 AM
#4
Fanatic Member
This is a very general question so a general solution might be:
If you really are a complete novice as you say then what you may be better off doing for the word bit of your project is using the Word macro recorder.
If you run through the process with the recorder on and then press ALT + F11 to get at the generated code.
You will then need to create a Word Object in your Access VBA code and pretty much paste in the recorded stuff
With objWord
'Your recorded code here
End With
You may well need to tweak the recorded code a bit but it should give you a good start!
If you inspect the Word Code you will see the bits that need customising and so populate these with the relevant variables.
I hope this has given you something to start with and you will find plenty of info at MSDN. eg
http://msdn.microsoft.com/library/de...ordObjects.asp
if you have any specific questions I am sure people in this forum will help you out!
-
Jan 9th, 2002, 09:20 AM
#5
Thread Starter
New Member
Thanks!!
That looks like the best way to go about this. I'll let you know how I get on!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|