Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
MailMerge hangs and crashes with Access on Server
I have successfully created an Access database that launches Word MailMerge
letters/catalogs, and populates the templates nicely, when the database is installed on my harddrive (with templates on the server.) (It is actually a series of 2 functions, which executes the merging of 2 different Mailmerges - one letter, and then one email on the click of one button.) I have now moved the database to the server, and word is launched, the template opened, but then when it attempts to populate the fields, Word just hangs and hangs, and eventually becomes nonresponsive. It did actually work one time, merging the first letter, but hanging on the opening of the second template. I know that the server is very slow, but is there anything I should look for to try and make this work? I am posting my code he Function MergeItInsuredOne() Dim objWord As Word.Document Set objWord = GetObject("X:\LCMG\Access Work\DTULetters\Insured Letter (Full) One Invoice.doc", "Word.Document") ' Make Word visible. objWord.Application.Visible = True ' Set the mail merge data source as the DTD database. objWord.MailMerge.OpenDataSource _ Name:="X:\LCMG\DTU\DTDBeta.mdb", _ LinkToSource:=True, _ Connection:="QUERY qryForReport", _ SQLStatement:="SELECT * FROM [qryForReport]WHERE ClaimNumber = '" & Me.ClaimNumberforMerge.Column(1) & "'" ' Execute the mail merge. objWord.MailMerge.Execute 'close the orginal file objWord.Close wdDoNotSaveChanges 'close Access copy not necessary when in user access mode (Docmd.Quit) MergeEmailInsuredFull End Function __________________________________________________ _____________ Function MergeEmailInsuredFull() Dim objWord As Word.Document Set objWord = GetObject("X:\LCMG\Access Work\DTULetters\EMail Insured Full.doc", "Word.Document") ' Make Word visible. objWord.Application.Visible = True ' Set the mail merge data source as the DTD database. objWord.MailMerge.OpenDataSource _ Name:="X:\LCMG\DTU\DTDBeta.mdb", _ LinkToSource:=True, _ Connection:="QUERY qryForReport", _ SQLStatement:="SELECT * FROM [qryForReport]WHERE ClaimNumber = '" & Me.ClaimNumberforMerge.Column(1) & "'" ' Execute the mail merge. objWord.MailMerge.Execute 'close the orginal file objWord.Close wdDoNotSaveChanges 'Lock Document If ActiveDocument.ProtectionType = wdNoProtection Then ActiveDocument.Protect Type:=wdAllowOnlyFormFields, _ NoReset:=True End If End Function |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Word hangs (crashes) on opening a document | Microsoft Word Help | |||
WORD 2003 XP HP printer Print Server hangs up | Microsoft Word Help | |||
MailMerge cannot access Exchange Server error | Mailmerge | |||
Word crashes when opening existing documents following server upg. | Microsoft Word Help | |||
Office 2003 - Mailmerge from Excel hangs/crashes | Mailmerge |