Mail merge from a query

Eddie Mason

Registered User.
Local time
Today, 01:53
Joined
Jan 31, 2003
Messages
142
Hi All,

I'm still having difficulty in XP merging from a query, the code I've used which is identical to what I've used in Access 97 is as follows:

Private Sub BtnMailMerge_Click()
On Error GoTo Err_BtnMailMerge_Click

Dim Filename As String
FrmLtrStr = "C:\shedfield\correspondence\councillors\envelopes"

Filename = "c:\peopledata.tmp"
DoCmd.TransferText acExportMerge, , "qryenter", Filename, True
MergeInWord "FrmLtrStr"


DoCmd.Hourglass False

Exit_BtnMailMerge_Click:
Exit Sub

Err_BtnMailMerge_Click:
MsgBox Err.Number & ": " & Err.Description, 16, "Error: " & Me.Name & ".BtnMailMerge_Click", Err.HelpFile, Err.HelpContext
Resume Exit_BtnMailMerge_Click

End Sub

However when I try to complile the query I get an error saying that 'Sub or Function not defined'.

Can anyone see what I'm doing wrong?

Regards

Eddie
 
What particular sub or function is giving the problem? Is a particular word highlightd when the error occurs?
 
Hi All,

Eventually I've soughted the problem out, I'd stuppidly forgotten that there was an additional function.

My appologies

Regards

Eddie
 

Users who are viewing this thread

Back
Top Bottom