Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
[email protected] sweetguy1only@gmail.com is offline
external usenet poster
 
Posts: 5
Default MailMerge from Access to Word 2003

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

 
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
mailmerge out of Access 2003 Dixie Mailmerge 5 August 19th 06 09:06 AM
Mailmerge doc will not open from Access 2003 ucmlamb Mailmerge 2 March 7th 06 04:00 PM
Mailmerge 2003 Word documents with Access yes/no values BrendaV Mailmerge 1 October 14th 05 04:21 PM
Mailmerge using Word and Access 2003 Chester1 Mailmerge 1 October 5th 05 12:47 PM
MailMerge Word 2003 to Access 2000 query blank data BCool Mailmerge 1 January 15th 05 12:31 AM


All times are GMT +1. The time now is 09:43 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"