Results 1 to 5 of 5

Thread: Help!!!

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2002
    Location
    Leeds
    Posts
    3

    Question 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

  2. #2
    Stiletto
    Guest
    To start, Use Shell command to launch Word
    VB Code:
    1. Shell Path, WindowStatus

  3. #3

    Thread Starter
    New Member
    Join Date
    Jan 2002
    Location
    Leeds
    Posts
    3
    OK. That's launching Word. What next???

  4. #4
    Fanatic Member
    Join Date
    Jul 2001
    Location
    London UK
    Posts
    671
    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!

  5. #5

    Thread Starter
    New Member
    Join Date
    Jan 2002
    Location
    Leeds
    Posts
    3
    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
  •  



Click Here to Expand Forum to Full Width