Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2003
    Location
    Lebanon
    Posts
    44

    Unanswered: Run a Macro in word through an access form

    Hi,
    I'm trying to find a code, for a button in a microsoft access form, that can run a Macro written and saved in a word document. Is there a way to do it? Thank you.
    Dani_30

  2. #2
    Join Date
    Apr 2004
    Location
    Sydney Australia
    Posts
    369
    Quote Originally Posted by stc834
    Hi,
    I'm trying to find a code, for a button in a microsoft access form, that can run a Macro written and saved in a word document. Is there a way to do it? Thank you.
    I don't know if this helps at all but I have several labels with code attached to OnClick that opens a specific Word.doc and then uses some Word fucntions within that code.

    For example

    docName.EditGoTo "RSA"
    docName.SelectCurIndent
    docName.EditCopy

    RSA is a bookmark and SelectCurIndent highlights the text from the bookmark to the end of the text.

    I also have a lot of this type of thing

    DoCmd.RunMacro "Macro11Suburb", , ""
    docName.EditGoTo "a4"
    docName.EditPaste

    The Macro11Suburb is a macro in Access that copies the data in the field.

    EditGoTo "a4" is going to a bookmark in the Word.doc
    EditPaste is pasting the clipboard to the bookmark a4

    I have not had much to do with macros in Word but I think if can put waht triggers the Word macro into Access code then it run OK.

    Mike

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •