Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / February 2005

Tip: Looking for answers? Try searching our database.

Word Mail Merge Problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Steve - 23 Feb 2005 11:28 GMT
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)
Jezebel - 23 Feb 2005 11:44 GMT
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'.

>I wonder if anyone can help.
>
[quoted text clipped - 29 lines]
> (I realise this method is horrible programming practice, but I'm
> really stuck)
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.