Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
4charity 4charity is offline
external usenet poster
 
Posts: 18
Default 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

Posting Rules

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Word hangs (crashes) on opening a document Tab Microsoft Word Help 1 April 20th 09 10:34 AM
WORD 2003 XP HP printer Print Server hangs up Recipe Printer Microsoft Word Help 0 March 8th 07 01:02 AM
MailMerge cannot access Exchange Server error R Mailmerge 1 July 27th 06 08:32 PM
Word crashes when opening existing documents following server upg. Word Template help Microsoft Word Help 4 January 30th 06 04:21 PM
Office 2003 - Mailmerge from Excel hangs/crashes ufischer Mailmerge 2 October 8th 05 11:13 PM


All times are GMT +1. The time now is 06:51 AM.

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"