Access 2003 Mail Merge different to Access XP ?

A

Alex

Hi

We have been running a small mailmerge using Access and Word XP. We have
now upgraded to Access and Word 2003, and now when I run the Mail merge
though Access in normal way, I do not get the option to Merge to pronter.
Button stays greyed out.

However, if I exit Access and Open the letter in Word, it runs the query,
selects the records and the Merge to Printer button is available .

I am assuming that Access 2003 does not like some of my code. I am using
the following:

If IsNull(Me.lstFiles) = False Then
strDocName = Me.lstFiles
If strDocName = "Moustraining Brochure" Then
If DCount("*", "qryMTBrochure") > 0 Then
Call RidesEditTemplate(strDirPath & Me.lstFiles & ".doc",
strDirPath, PMessage)
GoSub Happy
DoCmd.RunSQL "UPDATE (tblOrganisations INNER JOIN
tblContacts ON tblOrganisations.RecordId = tblContacts.[Record Id]) INNER
JOIN tblRequests ON tblOrganisations.RecordId = tblRequests.RecordId SET
tblContacts.[Current Contact] = 0, tblRequests.CompletedDate = Date(),
tblRequests.FollowUpDate = Date()+10, tblRequests.[ContactId] =
tblContacts.[ContactId] WHERE (((tblContacts.[Current Contact])=-1) AND
((tblRequests.Product)='MousTraining') AND
((tblRequests.Requirement)='Literature'));"
DoCmd.SetWarnings True
End
Else
MsgBox "There are no Moustraining Brochure requests to be
printed", , "The Modbury Group"
End
End If


The RidesEdit Template function is as follows:
Function RidesEditTemplate(strWordDoc As String, strSaveDir As String,
PMessage As String)

' Opens a word doc in mail merge mode 04/12/03

Dim WordApp As Object
Dim WordDoc As Object
Dim strDocName As String

clsPBar.ShowProgress
clsPBar.TextMsg = "Launching Microsoft Word...please wait..."


On Error GoTo CreateWordApp
Set WordApp = GetObject(, "Word.Application")
On Error GoTo 0

Set WordDoc = WordApp.Documents.Open(strWordDoc)
WordApp.Visible = True


AppActivate "Microsoft Word"
WordApp.WindowState = 0 'wdWindowStateRestore
'DoCmd.OpenForm "frmMessage", Windowmode:=acDialog

clsPBar.HideProgress

Exit Function

CreateWordApp:

Set WordApp = CreateObject("Word.Application")
Resume Next

End Function


Any help much appreciated

A
 

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