Unanswered: Question about "Requested object is not avaliable.
I have a vb code that when i click the Print button, it will print a
word file that is mailmerge, it works with no problem in most of computer in
my office, but one had problem, when I compile, it gave me an error message: Requsted object is not avalilable. The error happen on the code : .Destination= wdSendToPrinter
(Note: i select regular case).
The following is the code. I don't know what happen for that computer. It
works totally fine in other pc. Could someone please figure out this for me.
The following is the source code for the print button.
Private Sub cmdPrint_Click()
Dim wrd As Word.Application
Dim regletter As Word.Document
Dim reg2letter As Word.Document
Select Case Me![CertificationType]
DoCmd.OpenReport "Apostille", acViewPreview, , "[GeneralID] =
DoCmd.Close acQuery, "Qry_Regular_Report"
Set wrd = CreateObject("word.application")
wrd.Visible = True
wrd.WindowState = wdWindowStateMaximize
Set regletter =wrd.Documents.Openfilename:="c:\certification\reg ular.doc")
.Destination = wdSendToPrinter