>Steven,
>
>I bought the Automation book and although I was able to use their Merge method, I still have a couple of outstanding issues. First of all, I need a new set of data for each merge, and all I keep doing is adding records to the existing data.
In your code that's doing the merge, use a query to get only the records you want to merge this time and use that as the basis for creating the data source.
>Secondly, I want to automatically save the merged file and preview it, however I'm getting 3 windows - the original main document, the data source, and the preview of the merged document.
You can use automation code to close the others once the merge is done. Your best bet is to make sure you're holding onto object references to the main document and the data source, then closing them is just:
oMain.Close()
oDataSource.Close()
For the data source, you may actually have to pass a parameter to indicate that it should be closed without saving it.
Tamar
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only