M
Martin
Hi,
I've got this code for making a mailing. When I use this command with a
large mailing, the memory of my printer runs full. So I have to build in a
delay.
Does anyone know how?
Thanks,
Martin
part of the code I use:
'===start
If Not rstVerzenden.EOF Then
Set oApp = GetObject(, "Word.Application")
Set rstGeadresseerden = db.OpenRecordset("tblGeadresseerden",
dbOpenDynaset)
rstVerzenden.MoveFirst
Do Until rstVerzenden.EOF
oApp.Documents.Add Template:="c:\tempdoc\mailingPE.dot"
With oApp
.ActiveDocument.Bookmarks("txtDatum").Range = Me.txtDatum
.ActiveDocument.Bookmarks("txtBetreft").Range = Me.txtBetreft
.ActiveDocument.Bookmarks("txtBody").Range = Me.txtBody
With oApp
.ActiveDocument.PrintOut Background:=False
.ActiveDocument.Close SaveChanges:=wdDoNotSaveChanges
End With
End With
rstVerzenden.MoveNext
Loop
oApp.Quit wdDoNotSaveChanges
End If
'===end
I've got this code for making a mailing. When I use this command with a
large mailing, the memory of my printer runs full. So I have to build in a
delay.
Does anyone know how?
Thanks,
Martin
part of the code I use:
'===start
If Not rstVerzenden.EOF Then
Set oApp = GetObject(, "Word.Application")
Set rstGeadresseerden = db.OpenRecordset("tblGeadresseerden",
dbOpenDynaset)
rstVerzenden.MoveFirst
Do Until rstVerzenden.EOF
oApp.Documents.Add Template:="c:\tempdoc\mailingPE.dot"
With oApp
.ActiveDocument.Bookmarks("txtDatum").Range = Me.txtDatum
.ActiveDocument.Bookmarks("txtBetreft").Range = Me.txtBetreft
.ActiveDocument.Bookmarks("txtBody").Range = Me.txtBody
With oApp
.ActiveDocument.PrintOut Background:=False
.ActiveDocument.Close SaveChanges:=wdDoNotSaveChanges
End With
End With
rstVerzenden.MoveNext
Loop
oApp.Quit wdDoNotSaveChanges
End If
'===end