By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,652 Members | 1,905 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,652 IT Pros & Developers. It's quick & easy.

error :Method 'DocumentHTML' of object 'IDHTMLEdit' failed

P: 36
hi for every one

i using program for send e-mail

and i use 'IDHTMLEdit' to load text file with message

but after i load file and run program ,compiler show following messagebox:

Run-time error'-2147418113(8000ffff)':
Method 'DocumentHTML' of object 'IDHTMLEdit' failed

i want to help me to solve problem because i want to load text file with my message .

note : i use following function :

Expand|Select|Wrap|Line Numbers
  1. Sub SendEmail(MailServerName As String, FromName As String,FromEmailAddress As String, ToName As String, ToEmailAddress As String, EmailSubject As String, EmailBodyOfMessage As String, htmlBody)
and use next code for sending and loading :

Expand|Select|Wrap|Line Numbers
  1. dlgFile.FileName = "c:\COA.log"
  2.      htmlBody.LoadDocument dlgFile.FileName
  3.     SendEmail "", "Mohammad Ali", "", "SADAD", "", "Read Message", " COA", htmlBody.DocumentHTML
  5.     StatusTxt.Caption = "Mail Sent"
  6.     StatusTxt.Refresh
  7.     Close
  8.     MsgBox "COA_ ", vbExclamation, "Sending Status"
May 2 '07 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.