Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / January 2006

Tip: Looking for answers? Try searching our database.

Inserting Signature Text & Modifying Dates in Mailmerge Docs

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
AODguy - 02 Jan 2006 17:55 GMT
I routinely mailmerge Access data into an 8 page Word document that contains
dates and signatures. These signatures are typed and then initialed later. 8
other people use this same document. When changes are required to the basic
document, I have to save the document 8 more times to each user's directory
and have each user re-edit the signature lines in the document. The dates
also change each time the document is printed, but do not correspond to the
current date. I am often printing these forms for use a day or two in the
future.

I want to have a single document that can be used by all users, allowing
edits to be done just once. I have been trying to automate the signature
insertion and date changes, but have had no success.

Is there a way to read the signature lines from Access, or Word variables
via a pick list (combo box) when the Word document loads?

Is there a way to have Word prompt the user for the date, and then insert
that date in multiple locations in the document.

If anyone has an idea, I would greatly appreciate it.
Doug Robbins - Word MVP - 02 Jan 2006 18:45 GMT
See the article "How to create a Userform" at:

http://word.mvps.org/FAQs/Userforms/CreateAUserForm.htm

With reference set to the Microsoft DAO 3.6 Object Library under the
Tools>References menu in the Visual Basic Editor, the following code in a
user form will load data from an Access table into a listbox or combobox:

Private Sub UserForm_Initialize()

   Dim db As DAO.Database

   Dim rs As DAO.Recordset

   Dim NoOfRecords As Long

   ' Open the database

   Set db = OpenDatabase("D:\Access\ResidencesXP.mdb")

   ' Retrieve the recordset

   Set rs = db.OpenRecordset("SELECT * FROM Owners")

   ' Determine the number of retrieved records

   With rs

        .MoveLast

        NoOfRecords = .RecordCount

        .MoveFirst

   End With

   ' Set the number of Columns = number of Fields in recordset

   ListBox1.ColumnCount = rs.Fields.Count

   ' Load the ListBox with the retrieved records

   ListBox1.Column = rs.GetRows(NoOfRecords)

   ' Cleanup

   rs.Close

   db.Close

   Set rs = Nothing

   Set db = Nothing

End Sub

Signature

Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

>I routinely mailmerge Access data into an 8 page Word document that
>contains
[quoted text clipped - 21 lines]
>
> If anyone has an idea, I would greatly appreciate it.
AODguy - 02 Jan 2006 21:16 GMT
Thanks for the info. It should do the tricks I am looking for. More
importantly, I discovered the MVP site which is a gold mine of information.
Thanks again.

> See the article "How to create a Userform" at:
>
[quoted text clipped - 77 lines]
> >
> > If anyone has an idea, I would greatly appreciate it.

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.