Word Mail Merge Problem

S

Steve

I wonder if anyone can help.

I realise my programming logic is flawed, but any help of a different
approach would be grate-fully received.

I'm writing a routine in VBA that mail merges Word from an Access
database, and obviously creates another merged document.

What I want to do is close the original document (taking with it the
instance of Access that has been opened).

I can successfully do this, but when returned to the new document the
VBA environment has frozen because End Sub hasn't been executed.

ie

Set MergeDoc = ActiveDocument
..
..
..

MergeDoc.Close wdDoNotSaveChanges
End Sub

Has anyone got any ideas how to close this original document without
causing a hang?

TIA

Steve

(I realise this method is horrible programming practice, but I'm
really stuck)
 
J

Jezebel

There's nothing horrible about that in itself, and it shouldn't be causing
the hang. There must be something else going on. VBA doesn't freeze 'because
the End Sub hasn't been executed'.
 
Top