event generated when outlook launches word as mail editor.

  • Thread starter hitesh kadakia via AdminLife
  • Start date
H

hitesh kadakia via AdminLife

Hello to all experts on COM Add-ins.
couple of problems

I have to insert button in menubar. I have no problem if outlooklaunches simple editor with HTML or plain or RTF format. Butwhen user selects word as mail editor, I don't know which eventoccurs so to add button. NewInspectorEvent don't fire in thiscase.

2nd problem)
There is a menu option (I added)to insert hyperlink in the bodypart of oulook. When user selects this option I want topreserve all existing body content. But following code don'tkeep the formatting.
also hyperlink is not enabled.
-----------------------------------------------------------
strHtmlStart = "<html><head>" & _
"<META HTTP-EQUIV=""Content-Type"" CONTENT=""text/html;charset=utf-8"">" & _
"<META HTTP-EQUIV=""Content-Disposition""CONTENT=""attachment;filename=myfile.app"">" & _
"<head <body>"
'strHtml = strHtml & " <input type=""text""name=""origfilename"" value=""" & Trim(strOrigFileName) & """><BR>"
If bPswFlag = True Then
strURL = strIPURL & "," &fso.GetFileName(strFileName) & ".lnk"
strHtml = strHtml & " <a href=""" & strURL & """>" &fso.GetFileName(strFileName) & "</a> "
strHtml = strHtml & "<p>Password: " & "<I>" &strPassword & " </p> " & "</I>"
Else
strURL = strIPURL & "," & strFileName & ".lnk"
strHtml = strHtml & " <a href=""" & strURL & """>" &fso.GetFileName(strFileName) & "</a> "
End If

strHtmlEnd = "</body></html>"
'"<a href=""http://localhost/balaji/" &fso.GetFileName(Sourcefilepath) & """>http://localhost/balaji/"& fso.GetFileName(Sourcefilepath) & "</a>"
'hit olmail.HTMLBody = strHtmlStart & strHtml &strHtmlEnd
'Set item = golApp.CreateItem(0)
'item.Subject = "UHost"
'item.Save

strSavedBody = olmail.Body

'olmail.HTMLBody = olmail.HTMLBody & strHtmlStart &strHtml & strHtmlEnd

olmail.HTMLBody = strHtmlStart & strHtml & strHtmlEnd &"<br>" & "</br>" & strSavedBody
'olmail.Body = olmail.Body & strSavedBody

olmail.Subject = "iobi Webpublish Link"
olmail.Attachments.Remove (0)
olmail.Attachments.Add App.Path & "\uHostIcon.ico", 4, 1,fso.GetFileName(strFileName)

olmail.Display
olNs.Logoff
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top