Macro to open a mailmerged Document

DanielSpain

New member
Local time
Today, 08:50
Joined
Jan 2, 2013
Messages
1
Hello,
I'm using spanish version of access 2007.
I've been trying to create a runapp macro to open a mailmerged document, but I haven't managed.
Mi knowledge about Access2007 and macro's is pretty basic.
I tried putting in this, but it doesn't work: "C:\Program Files\Microsoft Office\Office12\MSOHEVI.DLL" "U:\Trial\Monthly Non-Payments\October Community Fee.docx"
The second part is supposedly the location of the document.
I've already put the database in a 'safe site' to see if that was the problem.

When I try to make it work, a message appears, saying: 'The route to application is incorrect or you are missing a component of the application'' (it says is in spanish, but i've tried to translate it).

I hope someone can help me...
Thanks,

Daniel

P.D. If you can't solve specifically my problem, can you explain it to me from the beginning?
 
Welcome to the forum, you could use some VBA code to open word and then the document like this, open your database and use Alt + F11 to go into VBA then use the Insert Menu and select Module then add this code, Stay inside the code and Press F5 to Run it and see if it opens the correct document, if so then save the Module and give it a name like modWord and then you can create a button somewhere and call the code or add the code behind the button in the Events Tab and On Click Event.

Sub openMail()
Dim wrdApp As Object
Set wrdApp = CreateObject("Word.Application")
With wrdApp
.Visible = True
.Documents.Open "U:\Trial\Monthly Non-Payments\October Community Fee.docx"

End With
End Sub
 

Users who are viewing this thread

Back
Top Bottom