D
DA
Hi Cory
The following steps should get you on the right track.
- Open your document.
- Open the VBA editor, double-click on "ThisDocument".
You should see a code window with two drop-downs at the
top. Select the left drop-down and select "Document".
- Now select the "Open" event from the right drop-down.
You'll see that Word inserts a new sub routine called
Document_Open()
- Place any code you want to run when the document opens
inside this routine. To bring up your "mailmerge find"
dialog, call the following:
WordBasic.MailMergeFindEntry
Your auto-update problem needs to be handled in another
routine. It's a little more complex, but also easily
done. You'll have to establish a connection to your
database first. From there you can search for your form
field value and if it's not there you can create a new
record. I suggest you do a bit of reading first (link
below) and give it a go. If you get stuck, just do
another post.
http://word.mvps.org/FAQs/InterDev/GetDataFromDB.htm
All the best,
Dennis
the customer name and then it brings up the requested
info.
long as i am posting is there a way to have the database
auto update when new information is typed into the fields
(i.e. if the customer is not in the database yet)
from me just let me know i will post a reply within a
couple hours.
The following steps should get you on the right track.
- Open your document.
- Open the VBA editor, double-click on "ThisDocument".
You should see a code window with two drop-downs at the
top. Select the left drop-down and select "Document".
- Now select the "Open" event from the right drop-down.
You'll see that Word inserts a new sub routine called
Document_Open()
- Place any code you want to run when the document opens
inside this routine. To bring up your "mailmerge find"
dialog, call the following:
WordBasic.MailMergeFindEntry
Your auto-update problem needs to be handled in another
routine. It's a little more complex, but also easily
done. You'll have to establish a connection to your
database first. From there you can search for your form
field value and if it's not there you can create a new
record. I suggest you do a bit of reading first (link
below) and give it a go. If you get stuck, just do
another post.
http://word.mvps.org/FAQs/InterDev/GetDataFromDB.htm
All the best,
Dennis
for the customer name then ship to and invoice to fields.-----Original Message-----
i have word 2002
i have a document that i hooked to an access database
Entry" button on the mail merge toolbar and then type inWhen i open the document i have to click on the "Find
the customer name and then it brings up the requested
info.
this "Find Entry" open when the document opens? Also asIs there a way i can write an on open command to have
long as i am posting is there a way to have the database
auto update when new information is typed into the fields
(i.e. if the customer is not in the database yet)
this post a couple times a day so if you need more infoAny suggestions would be very helpful. I will check
from me just let me know i will post a reply within a
couple hours.