Mail Merge

R

Rodger

Hello All,

I am not sure this is the correct form, if not maybe someone can tell me
where I should post.

Here is my goal.

I have an Access database that opens up several or just one Word Document(s)
depending on which document(s) they select. I have my queries in Access as
the Data Source. Depending on which icon the user click the report either
opens in Word or prints directly to the printer. This all works great as
long as only one user opens Word or Prints. If more than one user tries to
open Word or Print they get errors that access cannot open the temp table I
create at the time the user opens/prints the document. I had two thoughts
that could fix this issue, but I am not sure as I am writing this that they
will work.

Option 1: Make the Word Documents a Template. I must say I did try this
but when I run my code it just open the Template and not a new document.

Option 2: Somehow have the code do a SaveAs before it opens the Document.
But again the document still has a connection to the database.

So maybe I need a third option.

Option 3: Actually perform the mail merge so the new document does not have
a connection to the database. If I do this I want to also Save the new
document with maybe the Customers Name and the Document Name. OK if this is
the option that I need to do. Does anyone have an example?

TIA,
Rodger
 
K

kozaw

Hello All,

I am not sure this is the correct form, if not maybe someone can tell me
where I should post.

Here is my goal.

I have an Access database that opens up several or just one Word Document(s)
depending on which document(s) they select. I have my queries in Access as
the Data Source. Depending on which icon the user click the report either
opens in Word or prints directly to the printer. This all works great as
long as only one user opens Word or Prints. If more than one user tries to
open Word or Print they get errors that access cannot open the temp table I
create at the time the user opens/prints the document. I had two thoughts
that could fix this issue, but I am not sure as I am writing this that they
will work.

Option 1: Make the Word Documents a Template. I must say I did try this
but when I run my code it just open the Template and not a new document.

Option 2: Somehow have the code do a SaveAs before it opens the Document.
But again the document still has a connection to the database.

So maybe I need a third option.

Option 3: Actually perform the mail merge so the new document does not have
a connection to the database. If I do this I want to also Save the new
document with maybe the Customers Name and the Document Name. OK if this is
the option that I need to do. Does anyone have an example?

TIA,
Rodger

Hello Rodger,
I think your temp table (actually you said it was query) was locked by
1st accessed customer, and being it is a query it cant requery again
until 1st customer released it. I suggest to query on Mailmerge main
Document by MsQuery instead of accessing single query on access db by
multiple user.

For your later question, please read about creating word class module.
Perhaps you may be solved with MailMergeAfterMerge EVENT of Main
Document.
It can be found on word.mvp site or word developer help file or on
msdn.
If you just want to save a new document, then trying

if activedocument.saved = true then activedocument.save

It will prompt to save that document.
Brgds,
Ko Zaw
 
C

Cindy M.

Hi Rodger,
I am not sure this is the correct form, if not maybe someone can tell me
where I should post.
I answered this question the other day, in a different newsgroup (can't
remember which one).

Cindy Meister
 
R

Rodger

Yes you did it was in the MS.public.word.vba.beginners . . . . I replied
back to your message . . . . :)
 
K

kozaw

Hello All,

I am not sure this is the correct form, if not maybe someone can tell me
where I should post.

Here is my goal.

I have an Access database that opens up several or just one Word Document(s)
depending on which document(s) they select. I have my queries in Access as
the Data Source. Depending on which icon the user click the report either
opens in Word or prints directly to the printer. This all works great as
long as only one user opens Word or Prints. If more than one user tries to
open Word or Print they get errors that access cannot open the temp table I
create at the time the user opens/prints the document. I had two thoughts
that could fix this issue, but I am not sure as I am writing this that they
will work.

Option 1: Make the Word Documents a Template. I must say I did try this
but when I run my code it just open the Template and not a new document.

Option 2: Somehow have the code do a SaveAs before it opens the Document.
But again the document still has a connection to the database.

So maybe I need a third option.

Option 3: Actually perform the mail merge so the new document does not have
a connection to the database. If I do this I want to also Save the new
document with maybe the Customers Name and the Document Name. OK if this is
the option that I need to do. Does anyone have an example?

TIA,
Rodger

Hello Rodger,
I think your temp table (actually you said it was query) was locked by
1st accessed customer, and being it is a query it cant requery again
until 1st customer released it. I suggest to query on Mailmerge main
Document by MsQuery instead of accessing single query on access db by
multiple user.

For your later question, please read about creating word class module.
Perhaps you may be solved with MailMergeAfterMerge EVENT of Main
Document.
It can be found on word.mvp site or word developer help file or on
msdn.
If you just want to save a new document, then trying

activedocument.save

It will prompt to save that document.
Brgds,
Ko Zaw
 

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