MailMerge from Access to Word 2003

S

sweetguy1only

Hi all,

I am using VBA to create MS Access applications. When my clients get
the application, they are only getting the Access run-time; they
don't
need the full version of Access in order to run the application. The
problem that I am having with is, I am using VBA to do a mailmerge
from a recordset in Access to a new word document or existing word
document. This feature works on most of my cleints' machines.
However, for certain clients, when the word document comes up, the
Insert Merge Fields option in the Mail Merge Toolbar would be greyed
out. For these clients that are having problem, they are all using
Windows XP Professional with MS Word 2003. The weird thing is, I
have
Windows XP Professional with MS Word 2003 too but it works for me
every single time. My codes are as follows, can anyone give me some
pointers on how to correct the problem please?


Thanks in advance,
Monte


Set WordApp = CreateObject("Word.Application")


If stMergeDoc = "" Then 'Create a new Word doc


Set WordDoc = WordApp.Documents.Add


Else 'Open the word document selected by the user


Set WordDoc = WordApp.Documents.Open(stMergeDoc)
'Set objWord = GetObject(stMergeDoc, "Word.Document")


End If


WordApp.Visible = True
'objWord.Application.Visible = True


WordDoc.MailMerge.OpenDataSource _
Name:=CurrentDb.Name, _
LinkToSource:=True, _
Connection:="QUERY " & stMergeSrc, _
SubType:=wdMergeSubTypeWord2000
'SQLStatement:=strSQL


If Err.Number = 448 Then 'they have word 2000, so try again
without the subtype argument


WordDoc.MailMerge.OpenDataSource _
Name:=CurrentDb.Name, _
LinkToSource:=True, _
Connection:="QUERY " & stMergeSrc
End If
 
S

sweetguy1only

My first suggestion is to reinstall Office making sure that the entire
install is set to: Run All From My Computer.

Also, have a look at these Knowledge Base articles:

http://support.microsoft.com/ph/2530/en-us/?sid=47&aid=3&GSA_AC_More3
--
Arvin Meyer, MCP, MVPhttp://www.datastrat.comhttp://www.mvps.org/accesshttp://www.accessmvp.com


















- Show quoted text -

Well, most of my clients have contracts with some local "Geek Squad"
type of people to do the installation for them. For this particular,
he contacted this "Geek Squad" type of place and they told me that
they did a full installation on the computer; so, nothing was left out.
 
S

sweetguy1only

My first suggestion is to reinstall Office making sure that the entire
install is set to: Run All From My Computer.

Also, have a look at these Knowledge Base articles:

http://support.microsoft.com/ph/2530/en-us/?sid=47&aid=3&GSA_AC_More3
--
Arvin Meyer, MCP, MVPhttp://www.datastrat.comhttp://www.mvps.org/accesshttp://www.accessmvp.com


















- Show quoted text -

Well, most of my clients have contracts with some local "Geek Squad"
type of people to do the installation for them. For this particular,
he contacted this "Geek Squad" type of place and they told me that
they did a full installation on the computer; so, nothing was left out.
 

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