Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Close DataSource

Status
Not open for further replies.

ohmbru

Technical User
Jul 13, 2001
161
US
Is there a way to close the MailMerge DataSource on an active document? Here is the code I tried, but it did not work:

If ActiveDocument.MailMerge.DataSource.Name = "c:\pol.txt" Then
ActiveDocument.MailMerge.DataSource.Close
End If

The code that follows this copies a file as c:\pol.txt, but I get a runtime error 70 because it appears the document has this open as the datasource.

My think is that if I can close the datasource, then my runtime error will go away.



Brian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top