How to create a macro in Access

MarkMac 20 Reputation points
2025-08-27T14:38:14.1066667+00:00

Project1

I have this Form that lists all statements I need to e-mail to customers. How it works is:1- I copy the phone number 2- Click E-mail PDF 3- Paste the phone number into the pop-up box 4- it opens an E-mail ready to send. What i would like to do is automate this process. Where on the start of the macro it would copy the phone number proceed to the E-mail PDF and paste it into the Pop-up Window and send the e-mail and come do the next line. Is this possible to do?

Microsoft 365 and Office | Access | For business | Windows
0 comments No comments
{count} votes

Accepted answer
  1. DBG 11,456 Reputation points Volunteer Moderator
    2025-08-27T16:43:49.8+00:00

    Yes, that should be possible. Can you post the code behind the button and also the popup form, so we can tell you how to change it to do what you want? Thanks.


2 additional answers

Sort by: Most helpful
  1. Ken Sheridan 3,106 Reputation points
    2025-08-27T20:21:43.3766667+00:00

    You might like to take a look at InvoicePDF.zip in my Dropbox public databases folder at: 

    https://www.dropbox.com/scl/fo/0scigd3r48hx5xrev2jrf/AB0-GMdTgMAO5O1cGdr3QW0?rlkey=ib6bs6g9jqcrywwzivur3265t&dl=0

    This little demo file illustrates how to email a report (invoice in this case) to the relevant customer or customers.  If you elect to email multiple invoices, a dialogue is opened in which multiple invoices can be selected in a list box.  If invoices to multiple customers are selected in a multi-select list box in the dialogue, separate emails will be generated to each customer.

    1 person found this answer helpful.

  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.