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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Run time error 20545

Status
Not open for further replies.

Nitya

Programmer
May 21, 2001
1
DE
Hi,
I am trying to export a report as a mail attachment. I have a VB application to do this.
I initially logon to my mail server and set the report options and then try to export the report as below

-----------------------------------------------------------
Set objSession = CreateObject("MAPI.Session")

objSession.Logon "Test", "", True, True

rep.ExportOptions.DestinationType = crEDTEMailMAPI
rep.ExportOptions.MailSubject = lblRepName
rep.ExportOptions.MailMessage = lsMessage
rep.ExportOptions.MailToList = lsRecs
rep.ExportOptions.FormatType = crEFTRichText
rep.Export (False)
--------------------------------------------------------
I then get a form asking me the number of pages to export.
As soon as I press ok I get the error
"run time error 'Request Cancelled by User' "
Even if I press cancel I get the same message.
I am quite sure that I have logged onto the mail server.
What else could be the problem?
I am using CR 8.5 with VB6
 
try this.

open your mail software

run the program without the login to the mail server issue. i mean, yuor program only have to run the report and export to mail.

this way you will know if your error is in the mail or in the report
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top