Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

automating mailmerge via Access 2k

Status
Not open for further replies.

hotreca

Technical User
Nov 19, 2002
25
0
0
DE
Hi I'm trying to automated a e-mailing mail merge via access

the fields used are

title
fname
lname
email
group (4)

now I want to send periodical emails to each group How can I automate this useing Access 2k
the subject line changes with each mailing, the word doc remains the same. Outlook is installed on the machine


 
Here are some of the steps. Maybe others can fill in other pieces. I'm not sure how much you know so I will go step by step. My apologies if you know much of this.

1. Open the word document where the mail merge is created

2. On the Tools menu, Select Tools, Macro, Record Macro

3. Name it, make notes or whatever

4. Make sure you save it in the Normal file so that it will be retained for you

5. Go through the mail merge steps

6. When finished click Tools, Macro, Stop Recording

7. Click Tools, Macro, Macros and then select the macro you just crated - Click edit to view the VBA code it created

8. Open access and create a new module

9. Click on the Tools menu and select References

10. Scroll down to the Microsoft portion and click on the one named Microsoft Word x.x Object Library

11. This allows you to control Word from Access

12. Add the following lines at the beginning of your sub or function - this code creates a word app for you to control

Dim objWordApp As Word.Application
Set objWordApp = CreateObject("YourWordFileNameAndPath")

13. Add the following line before the First piece of code that the Word macro created for you - this tells Access to use the Word app object you created when it processes the Word commands below

With objWordApp

14. Add the following line after the Last piece of code that the Word macro created for you - like If/End If pairs

End With

Sorry, I have to leave for work. Hopefully this will ge you started anyway. Good Luck!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top