c# - Using Word Editor to modify inbox email in Outlook 2007 -
i facing situation can use word editor modify contents of open inbox(active explorer).
i know use word editor compose window, there way access body of email thorough word editor.
code using word editor in compose window.
public void click(office.iribboncontrol control) { outlook.inspector uiinspector = globals.thisaddin.application.activeinspector(); object uiobject = uiinspector.currentitem; if (uiobject outlook.mailitem && uiinspector.iswordmail()) { outlook.mailitem uiitem = (outlook.mailitem)uiobject; word.document uidoc = uiinspector.wordeditor word.document; if (uidoc != null) { word.find uifind = uidoc.range().find; uifind.text = "asa^$^$^#^#^#^#^#"; while (uifind.execute()) { var rng = uifind.parent microsoft.office.interop.word.range; rng.hyperlinks.add(rng, "http://stack.com=" + rng.text + "outlook2007"); rng.collapse(word.wdcollapsedirection.wdcollapseend); } } }
http://social.msdn.microsoft.com/forums/en-us/outlookdev/thread/c7393ccf-4b7e-4034-ba73-6d4e8fcb8c19
this link contains same question answer.
Comments
Post a Comment