Jump to content
Macro Express Forums

how to trigger macro express or short cut from ms-access


sunilvedula
 Share

Recommended Posts

HI all,

 

i want to trigger macro express when a key is pressed in ms-access database. i have developed a database in ms- access which multiple users use. Now when they complete a work they need to send an email to business are confirming the job is done with a formatted excel sheet to which a reply is sought from the business area who will attach some images and send it back to us.

 

With access i am able to send mail but cannot format the excel sheet the way i want. i have designed a macro to do the desing part so that it goes to the mail and pastes the data in exce in rich text format so that the business are people can drop images beside the data and send it back to us.

 

to make this possible i should be able to trigger the macro express but that i find it difficult. i can try opening the macro file with sql code but how do i make it trigger?

 

can macro express self trigger once the file is opened?

 

any ideas please put forward as i need to submit my presentation ASAP.

 

BTW I USE MACRO EXPRESS 3.2

Link to comment
Share on other sites

You need to write an Access macro using RunCode to call a VBA public function which you must write. This macro can be triggered via a hotkey, e.g. Ctrl-M, by setting up an Autokeys macro.

 

Your VBA function will do one of 2 things:

- use the Shell command to call MeProc passing in the name of your macro

(plus any parameters you may want to use via the Variables Restore command)

 

- use the VBA code published here: Using PostMessage (but I haven't found a way of passing parameters using this method)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...