Wrox Programmer Forums
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 18th, 2005, 03:39 PM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 217
Thanks: 0
Thanked 1 Time in 1 Post
Default missing DLL error (48)

Could anyone shed some light, or suggest what else to try?

I have a new .mdb which uses MailMerge to create form letters. The mdb runs FINE and Word and Mail Merge launch fine, with the record limited to the correct one on my home development machine. HOWEVER, when I move the file to a server at work MailMerge fails with "Error #48, missing DLL". I really want to get it to work on my machine at work and my co-workers machine as well. It would give us so much flexibility, not to mention all the work and frustration that went into the adventure...(Work machines are now running XP Pro, with Office 2K. Install did not work when machine had Windows 2000).

MDB runs FINE on 3 other machines which are running either XP-Pro or XP-Home as OS and Office 2K. (2 of the machines have Office Development licenses, the third has just plain Office and a new version of Visual Studio is installed as well. ) I used Package and Deploy to create an installation package as I used a few ActiveX controls in the MDB. The ActiveX Controls are working okay.....)

Code errors out at the GetObject call........and of course Word hasn't yet opened.

Thanks,

Loralee
*********************************************
Private Sub cmdMergeLetter_Click()
' this is an attempt to open a Word document and start a mail merge
Dim strFilePath As String
Dim objWord As Word.Document
Dim strPatientID As String ' use to link to patient
Dim strSELECT As String
Dim strFROM As String
Dim strWHERE As String
Dim strSQLMerge As String

strPatientID = Forms!frmpatientdata.txtPatientID
strSELECT = "SELECT tblPatient.[PatientID], tblPatient.[PtFirstName], tblPatient.[PtLastName], tblPatient.[PtBD], tblCity.[City], tblPatient.[PtAddress], tblPatient.[PtZip], tblReferral.[ReferBy]"
strFROM = " FROM (tblCity INNER JOIN tblPatient ON tblCity.[CityID] = tblPatient.[PtCityFK]) INNER JOIN tblReferral ON tblPatient.[PatientID] = tblReferral.[PtFK]"
strWHERE = " WHERE ((([PatientID])= " & strPatientID & "))"
strSQLMerge = strSELECT & strFROM & strWHERE

CurrentDb.QueryDefs("qrymailmerge").SQL = strSQLMerge


'CurrentDb.QueryDefs("qrymailmerge").filter = "[patientid] = strpatientid"
Me.cmdlg.DialogTitle = "Choose File Name and Location"
Me.cmdlg.ShowOpen
strFilePath = Me.cmdlg.FileName

Set objWord = GetObject(strFilePath, "Word.document") ' ERRORS OUT HERE (#48)

' make word visible
objWord.Application.Visible = True

'objWord.MailMerge.OpenDataSource _
    'Name:="C:\Documents and Settings\Name\My Documents\Provider Management Database" & _
   '"\Provider Management.mdb", _
  ' LinkToSource:=True, _
  ' Connection:="QUERY qrymailmerge"
   ' , _
   ' SQLStatement:="SELECT * FROM tblPatient"


' execute the mail merge
objWord.MailMerge.Execute
objWord.Close

End Sub
***************************************







Similar Threads
Thread Thread Starter Forum Replies Last Post
Missing System.Data.SQLClient dll mike_abc VB.NET 2 June 3rd, 2011 10:18 PM
Error 48 Early Binding jdrake3 VB Components 7 September 27th, 2007 03:27 PM
Missing or out-of-date export DLL svetlagusik Classic ASP Components 0 July 28th, 2006 10:22 AM
missing vnsapi32.dll javeira SQL Server 2000 0 April 11th, 2006 10:07 AM
Missing php4apache2.dll kara333 BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 1 September 14th, 2004 08:20 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.