![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
Hello,
I am in the process of upgrading one of our add-ins to Outlook 2007. This specific add-in made use of the HTML editor which we used to add HTML elements to the document. I have discovered that the “GetHtmlEditor” method no longer works and we have to use the Word Editor to edit the document. The problem is that I try to get the word editor and the method fails. In other words the following call no longer works. CComQIPtrMSWord::_Document spDoc = m_pInspector-GetWordEditor(); I want to get the HTML document if possible. It there a way to edit the HTML document anymore? Does anybody have any experience with this? Thanks for your help, Tom - |
Ads |
#2
|
|||
|
|||
![]()
HTMLEditor is obsolete in Outlook 2007, because Outlook 2007 does not use IE for rendering HTML messages. You can return the HTML content as a string through the HTMLBody property, though.
When are you calling WordEditor? It won't work in the NewInspector event handler. You'd need to wait until Inspector.Activate fires. BTW, both these issues are documented in my known problems list at http://outlookcode.com/article.aspx?id=59, -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Tom at GSD" wrote in message ... Hello, I am in the process of upgrading one of our add-ins to Outlook 2007. This specific add-in made use of the HTML editor which we used to add HTML elements to the document. I have discovered that the “GetHtmlEditor” method no longer works and we have to use the Word Editor to edit the document. The problem is that I try to get the word editor and the method fails. In other words the following call no longer works. CComQIPtrMSWord::_Document spDoc = m_pInspector-GetWordEditor(); I want to get the HTML document if possible. It there a way to edit the HTML document anymore? Does anybody have any experience with this? Thanks for your help, Tom - |
#3
|
|||
|
|||
![]() My mistake - I am getting the word document the debugger got me. Now All I have to do is figure out how to edit the document. ;-( "Tom at GSD" wrote: Hello, I am in the process of upgrading one of our add-ins to Outlook 2007. This specific add-in made use of the HTML editor which we used to add HTML elements to the document. I have discovered that the “GetHtmlEditor” method no longer works and we have to use the Word Editor to edit the document. The problem is that I try to get the word editor and the method fails. In other words the following call no longer works. CComQIPtrMSWord::_Document spDoc = m_pInspector-GetWordEditor(); I want to get the HTML document if possible. It there a way to edit the HTML document anymore? Does anybody have any experience with this? Thanks for your help, Tom - |
#4
|
|||
|
|||
![]()
You'd edit the document with Word methods. For example, the VBA sample at http://outlookcode.com/codedetail.aspx?id=1571 demonstrates how to obtain the insertion point (Word.Selection) and insert a quick part (replacement for AutoText).
-- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Tom at GSD" wrote in message ... My mistake - I am getting the word document the debugger got me. Now All I have to do is figure out how to edit the document. ;-( "Tom at GSD" wrote: Hello, I am in the process of upgrading one of our add-ins to Outlook 2007. This specific add-in made use of the HTML editor which we used to add HTML elements to the document. I have discovered that the “GetHtmlEditor” method no longer works and we have to use the Word Editor to edit the document. The problem is that I try to get the word editor and the method fails. In other words the following call no longer works. CComQIPtrMSWord::_Document spDoc = m_pInspector-GetWordEditor(); I want to get the HTML document if possible. It there a way to edit the HTML document anymore? Does anybody have any experience with this? Thanks for your help, Tom - |
#5
|
|||
|
|||
![]()
I have a problem where I need to add/insert an HTML link or image at a
specific point in the document in the new message window. In 2003 we simply got the current mouse position and inserted the HTML through a button click. Is there a way to do this utilizing the word editor (WORD:_Docment)? Thanks for your help "Sue Mosher [MVP-Outlook]" wrote: HTMLEditor is obsolete in Outlook 2007, because Outlook 2007 does not use IE for rendering HTML messages. You can return the HTML content as a string through the HTMLBody property, though. When are you calling WordEditor? It won't work in the NewInspector event handler. You'd need to wait until Inspector.Activate fires. BTW, both these issues are documented in my known problems list at http://outlookcode.com/article.aspx?id=59, -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Tom at GSD" wrote in message ... Hello, I am in the process of upgrading one of our add-ins to Outlook 2007. This specific add-in made use of the HTML editor which we used to add HTML elements to the document. I have discovered that the “GetHtmlEditor” method no longer works and we have to use the Word Editor to edit the document. The problem is that I try to get the word editor and the method fails. In other words the following call no longer works. CComQIPtrMSWord::_Document spDoc = m_pInspector-GetWordEditor(); I want to get the HTML document if possible. It there a way to edit the HTML document anymore? Does anybody have any experience with this? Thanks for your help, Tom - |
#6
|
|||
|
|||
![]()
Thanks Sue
Will that work even if there is not any text selected? For example if I wanted to insert a link that would specify an article of the web at a specifc point in the document - could I do this by just clicking the mouse at a specific point and then inserting the link at that position in the document. The add-in that I have designed adds reference links to the document so that the recipient can access documents that are availble on the web. "Sue Mosher [MVP-Outlook]" wrote: You'd edit the document with Word methods. For example, the VBA sample at http://outlookcode.com/codedetail.aspx?id=1571 demonstrates how to obtain the insertion point (Word.Selection) and insert a quick part (replacement for AutoText). -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Tom at GSD" wrote in message ... My mistake - I am getting the word document the debugger got me. Now All I have to do is figure out how to edit the document. ;-( "Tom at GSD" wrote: Hello, I am in the process of upgrading one of our add-ins to Outlook 2007. This specific add-in made use of the HTML editor which we used to add HTML elements to the document. I have discovered that the “GetHtmlEditor” method no longer works and we have to use the Word Editor to edit the document. The problem is that I try to get the word editor and the method fails. In other words the following call no longer works. CComQIPtrMSWord::_Document spDoc = m_pInspector-GetWordEditor(); I want to get the HTML document if possible. It there a way to edit the HTML document anymore? Does anybody have any experience with this? Thanks for your help, Tom - |
#7
|
|||
|
|||
![]()
You lost me there. "just clicking the mouse ... and inserting the link" sounds like something that you want the user to do. What's the programmatic component?
You may find it useful to use the Word macro recorder to get to know Word's methods better. Most recorded Word macros use an intrinsic Selection object. To adapt them for Outlook add-in use, you'd need to return a Word.Selection object using the approach in my sample. -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Tom at GSD" wrote in message ... Thanks Sue Will that work even if there is not any text selected? For example if I wanted to insert a link that would specify an article of the web at a specifc point in the document - could I do this by just clicking the mouse at a specific point and then inserting the link at that position in the document. The add-in that I have designed adds reference links to the document so that the recipient can access documents that are availble on the web. "Sue Mosher [MVP-Outlook]" wrote: You'd edit the document with Word methods. For example, the VBA sample at http://outlookcode.com/codedetail.aspx?id=1571 demonstrates how to obtain the insertion point (Word.Selection) and insert a quick part (replacement for AutoText). "Tom at GSD" wrote in message ... My mistake - I am getting the word document the debugger got me. Now All I have to do is figure out how to edit the document. ;-( "Tom at GSD" wrote: Hello, I am in the process of upgrading one of our add-ins to Outlook 2007. This specific add-in made use of the HTML editor which we used to add HTML elements to the document. I have discovered that the “GetHtmlEditor” method no longer works and we have to use the Word Editor to edit the document. The problem is that I try to get the word editor and the method fails. In other words the following call no longer works. CComQIPtrMSWord::_Document spDoc = m_pInspector-GetWordEditor(); I want to get the HTML document if possible. It there a way to edit the HTML document anymore? Does anybody have any experience with this? Thanks for your help, Tom - |
#8
|
|||
|
|||
![]()
I am sorry Sue. Thanks for your help.
Yes the user has to obviously click the mouse at a point in the document where the insertion is to occur. So when the user clicks on our command bar button it will insert a link at the point where the "cursor" was last at within the document. My question was will your code reference the point where the cursor is, or do we have to select text for that methodolgy to work? So what we are actually trying to do is insert text at a cursor position. The code that we currently have for 2003 gets the current caret position and then creates a text range within the dcoument, moves to that point in the document and inserts our HTML. "Sue Mosher [MVP-Outlook]" wrote: You lost me there. "just clicking the mouse ... and inserting the link" sounds like something that you want the user to do. What's the programmatic component? You may find it useful to use the Word macro recorder to get to know Word's methods better. Most recorded Word macros use an intrinsic Selection object. To adapt them for Outlook add-in use, you'd need to return a Word.Selection object using the approach in my sample. -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Tom at GSD" wrote in message ... Thanks Sue Will that work even if there is not any text selected? For example if I wanted to insert a link that would specify an article of the web at a specifc point in the document - could I do this by just clicking the mouse at a specific point and then inserting the link at that position in the document. The add-in that I have designed adds reference links to the document so that the recipient can access documents that are availble on the web. "Sue Mosher [MVP-Outlook]" wrote: You'd edit the document with Word methods. For example, the VBA sample at http://outlookcode.com/codedetail.aspx?id=1571 demonstrates how to obtain the insertion point (Word.Selection) and insert a quick part (replacement for AutoText). "Tom at GSD" wrote in message ... My mistake - I am getting the word document the debugger got me. Now All I have to do is figure out how to edit the document. ;-( "Tom at GSD" wrote: Hello, I am in the process of upgrading one of our add-ins to Outlook 2007. This specific add-in made use of the HTML editor which we used to add HTML elements to the document. I have discovered that the “GetHtmlEditor” method no longer works and we have to use the Word Editor to edit the document. The problem is that I try to get the word editor and the method fails. In other words the following call no longer works. CComQIPtrMSWord::_Document spDoc = m_pInspector-GetWordEditor(); I want to get the HTML document if possible. It there a way to edit the HTML document anymore? Does anybody have any experience with this? Thanks for your help, Tom - |
#9
|
|||
|
|||
![]()
Yes, the cursor position is represented by the Word.Selection object, whether text is selected or not.
-- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Tom at GSD" wrote in message ... I am sorry Sue. Thanks for your help. Yes the user has to obviously click the mouse at a point in the document where the insertion is to occur. So when the user clicks on our command bar button it will insert a link at the point where the "cursor" was last at within the document. My question was will your code reference the point where the cursor is, or do we have to select text for that methodolgy to work? So what we are actually trying to do is insert text at a cursor position. The code that we currently have for 2003 gets the current caret position and then creates a text range within the dcoument, moves to that point in the document and inserts our HTML. "Sue Mosher [MVP-Outlook]" wrote: You lost me there. "just clicking the mouse ... and inserting the link" sounds like something that you want the user to do. What's the programmatic component? You may find it useful to use the Word macro recorder to get to know Word's methods better. Most recorded Word macros use an intrinsic Selection object. To adapt them for Outlook add-in use, you'd need to return a Word.Selection object using the approach in my sample. "Tom at GSD" wrote in message ... Thanks Sue Will that work even if there is not any text selected? For example if I wanted to insert a link that would specify an article of the web at a specifc point in the document - could I do this by just clicking the mouse at a specific point and then inserting the link at that position in the document. The add-in that I have designed adds reference links to the document so that the recipient can access documents that are availble on the web. "Sue Mosher [MVP-Outlook]" wrote: You'd edit the document with Word methods. For example, the VBA sample at http://outlookcode.com/codedetail.aspx?id=1571 demonstrates how to obtain the insertion point (Word.Selection) and insert a quick part (replacement for AutoText). "Tom at GSD" wrote in message ... My mistake - I am getting the word document the debugger got me. Now All I have to do is figure out how to edit the document. ;-( "Tom at GSD" wrote: Hello, I am in the process of upgrading one of our add-ins to Outlook 2007. This specific add-in made use of the HTML editor which we used to add HTML elements to the document. I have discovered that the “GetHtmlEditor” method no longer works and we have to use the Word Editor to edit the document. The problem is that I try to get the word editor and the method fails. In other words the following call no longer works. CComQIPtrMSWord::_Document spDoc = m_pInspector-GetWordEditor(); I want to get the HTML document if possible. It there a way to edit the HTML document anymore? Does anybody have any experience with this? Thanks for your help, Tom - |
#10
|
|||
|
|||
![]()
Thanks for your help Sue. I will give this approach a try.
"Sue Mosher [MVP-Outlook]" wrote: Yes, the cursor position is represented by the Word.Selection object, whether text is selected or not. -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Tom at GSD" wrote in message ... I am sorry Sue. Thanks for your help. Yes the user has to obviously click the mouse at a point in the document where the insertion is to occur. So when the user clicks on our command bar button it will insert a link at the point where the "cursor" was last at within the document. My question was will your code reference the point where the cursor is, or do we have to select text for that methodolgy to work? So what we are actually trying to do is insert text at a cursor position. The code that we currently have for 2003 gets the current caret position and then creates a text range within the dcoument, moves to that point in the document and inserts our HTML. "Sue Mosher [MVP-Outlook]" wrote: You lost me there. "just clicking the mouse ... and inserting the link" sounds like something that you want the user to do. What's the programmatic component? You may find it useful to use the Word macro recorder to get to know Word's methods better. Most recorded Word macros use an intrinsic Selection object. To adapt them for Outlook add-in use, you'd need to return a Word.Selection object using the approach in my sample. "Tom at GSD" wrote in message ... Thanks Sue Will that work even if there is not any text selected? For example if I wanted to insert a link that would specify an article of the web at a specifc point in the document - could I do this by just clicking the mouse at a specific point and then inserting the link at that position in the document. The add-in that I have designed adds reference links to the document so that the recipient can access documents that are availble on the web. "Sue Mosher [MVP-Outlook]" wrote: You'd edit the document with Word methods. For example, the VBA sample at http://outlookcode.com/codedetail.aspx?id=1571 demonstrates how to obtain the insertion point (Word.Selection) and insert a quick part (replacement for AutoText). "Tom at GSD" wrote in message ... My mistake - I am getting the word document the debugger got me. Now All I have to do is figure out how to edit the document. ;-( "Tom at GSD" wrote: Hello, I am in the process of upgrading one of our add-ins to Outlook 2007. This specific add-in made use of the HTML editor which we used to add HTML elements to the document. I have discovered that the “GetHtmlEditor” method no longer works and we have to use the Word Editor to edit the document. The problem is that I try to get the word editor and the method fails. In other words the following call no longer works. CComQIPtrMSWord::_Document spDoc = m_pInspector-GetWordEditor(); I want to get the HTML document if possible. It there a way to edit the HTML document anymore? Does anybody have any experience with this? Thanks for your help, Tom - |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Outlook 2003 HTML editor error | Marla | Outlook - Installation | 3 | January 10th 07 07:21 AM |
New Message Window Problem (word as editor) | Tom at GSD | Add-ins for Outlook | 8 | October 10th 06 04:11 PM |
In Outlook 2003 how do I bring up an HTML source editor (as in OE) | Ben Feese | Outlook - General Queries | 5 | September 14th 06 02:01 AM |
Differences with Word and outlook as HTMl editor | Lincoln De Kalb | Outlook - General Queries | 1 | August 11th 06 08:46 AM |
Formatting in HTML editor | tcebob | Outlook Express | 1 | July 26th 06 09:02 PM |