I have created a program to open a mailmerge template, and will use VB to control the merging of document.
I have initially work with this using WinXP, but realize that it wouldn't work for those in Win2000 environment. Therefore I have recompiled the project in a Win2k environment, reference object change from Microsoft Word 10.0 Object library to Microsoft Word 9.0 object library.
The compilation is fine, but I meet with a little problem. In my code I have this line:
If .State = wdMainAndDataSource Then
.Destination = wdSendToPrinter
.SuppressBlankLines = True
'get the record count of the datasource
.ActiveRecord = wdLastRecord
x = .ActiveRecord
'set the activerecord back to the first
.ActiveRecord = wdFirstRecord
Dim s As String
'loop the datasource count and merge one record at a time
For i = 1 To x
.DataSource.FirstRecord = i
.DataSource.LastRecord = i
.DataSource.ActiveRecord = i
In WinXP environment, the job gets printed into the default printer directly, however in Win2K, the print dialog box get displayed.
Does anyone know if this is the behaviour of Word2000? And how can I overcome this?