Auto Print from multiple tables

K

Krefty

Thanks for looking at my problem...I am wondering how to
set up a Print button on a Form that will referance 3-
specific Text box/table contents...and then export the
contents of the selected student on the form to print a
word certificate.....Any ideas?

Thanks, Krefty
 
T

Tim Ferguson

Thanks for looking at my problem...I am wondering how to
set up a Print button on a Form that will referance 3-
specific Text box/table contents...and then export the
contents of the selected student on the form to print a
word certificate.....Any ideas?

Probably something along the lines of this: hugely oversimplified so you
can see what is meant to be happenning.

dim appWord as New Word.Application
Dim docWord as Word.Document
Dim bmkCurrent as Word.Bookmark

Set docWord = appWord.Documents.Add("StudentReportTemplate")

Set bmkCurrent = appWord.BookMarks("FullName")
bmkCurrent.Text = Me!txtFullName

Set bmkCurrent = appWord.BookMarks("ClassTitle")
bmkCurrent.Text = Me!txtClassTitle

Set bmkCurrent = appWord.Bookmarks("TeachersNotes")
bmkCurrent.Text = Me!memoNotes

docWord.PrintOut(wdCurrentPage) ' can't remember arguments

docWord.Close wdNoSave
appWord.Quite


Hope that gives you something to start on.
Best wishes


Tim F
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top