Word link - partway there I think (1 Viewer)

Mahall906

New member
Local time
Today, 06:27
Joined
Apr 11, 2014
Messages
29
Afternoon all,

I have word document letter template called 'Warning'.

There are fields within the letter that are linked (mail merge way) to my database, including ID, name, etc.

This creates each letter perfectly for each ID.

However;

Can I change my command button, that opens the letter, to open the specific ID?

The current command is:
Private Sub command2593_Click()
Application.FollowHyperlink "S:\Enfor\Badge\Warnings\2.0 Warnings\Warning.docx"
End Sub

This opens the letter perfectly, but can I get it to choose the relevant and matching ID within the Word document
Screenshot 2023-10-16 152440.jpg
?


N.B. I have some example databases but due to company security, I cannot open them.

Thanks in advance

M
 
Last edited:

Gasman

Enthusiastic Amateur
Local time
Today, 06:27
Joined
Sep 21, 2011
Messages
14,299
Use a query that references the ID from your form and use that in your mailmerge?
 

Mahall906

New member
Local time
Today, 06:27
Joined
Apr 11, 2014
Messages
29
Use a query that references the ID from your form and use that in your mailmerge?
Thanks Gasman.
I have a query within the database which the Word letter is getting its information from. I just cannot figure out the coding i need to use (f any) to have it selct the relevant ID letter when it opens Word.
 

Gasman

Enthusiastic Amateur
Local time
Today, 06:27
Joined
Sep 21, 2011
Messages
14,299
Well you can select recipients from within Word, but that is manual.
That is why I suggested another query that produces only that one record.

I would likely have an option button that would tell Access whether I wanted one or all records.
That would then open the relevant word document that refers to each query.
 

Mahall906

New member
Local time
Today, 06:27
Joined
Apr 11, 2014
Messages
29
Well you can select recipients from within Word, but that is manual.
That is why I suggested another query that produces only that one record.

I would likely have an option button that would tell Access whether I wanted one or all records.
That would then open the relevant word document that refers to each query.
I see what you mean, I can the query down further. I like it! Thanks
 

moke123

AWF VIP
Local time
Today, 01:27
Joined
Jan 11, 2013
Messages
3,920
Why not automate the merge from within Access?

here's an old demo
 

Attachments

  • NewWordDemo.accdb
    840 KB · Views: 45

Users who are viewing this thread

Top Bottom