![]() |
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
|
|||
|
|||
![]()
How do I get a marked piece of text in a email into a string in my VBA ?
Thanks Peter. |
Ads |
#2
|
|||
|
|||
![]()
Marked where? Reading pane? Open Inspector window? In what version of Outlook?
-- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Peter R." wrote in message news ![]() How do I get a marked piece of text in a email into a string in my VBA ? Thanks Peter. |
#3
|
|||
|
|||
![]()
A piece of tekst marked in a opened email message.
"Sue Mosher [MVP-Outlook]" wrote: Marked where? Reading pane? Open Inspector window? In what version of Outlook? -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Peter R." wrote in message news ![]() How do I get a marked piece of text in a email into a string in my VBA ? Thanks Peter. |
#4
|
|||
|
|||
![]()
In what version of Outlook? In a received message? Message in the process of being composed?
What format message -- HTML, RTF, plain text? All these details matter. -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Peter R." wrote in message ... A piece of tekst marked in a opened email message. "Sue Mosher [MVP-Outlook]" wrote: Marked where? Reading pane? Open Inspector window? In what version of Outlook? -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Peter R." wrote in message news ![]() How do I get a marked piece of text in a email into a string in my VBA ? Thanks Peter. |
#5
|
|||
|
|||
![]()
Thanks again Sue.
It´s Outlook 2007, it´s a received message in the Inbox. "Sue Mosher [MVP-Outlook]" wrote: In what version of Outlook? In a received message? Message in the process of being composed? What format message -- HTML, RTF, plain text? All these details matter. -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Peter R." wrote in message ... A piece of tekst marked in a opened email message. "Sue Mosher [MVP-Outlook]" wrote: Marked where? Reading pane? Open Inspector window? In what version of Outlook? -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Peter R." wrote in message news ![]() Thanks Peter. |
#6
|
|||
|
|||
![]()
That's the easiest scenario to handle, because Word is always the email editor in Outlook 2007:
Set objOL = Outlook.Application Set objDoc = objOL.ActiveInspector.WordEditor Set objWord = objDoc.Application Set objSel = objDoc.Windows(1).selection MsgBox objSel.Text -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Peter R." wrote in message ... It´s Outlook 2007, it´s a received message in the Inbox. A piece of tekst marked in a opened email message. How do I get a marked piece of text in a email into a string in my VBA ? |
#7
|
|||
|
|||
![]()
thanks a lot!
"Sue Mosher [MVP-Outlook]" wrote: That's the easiest scenario to handle, because Word is always the email editor in Outlook 2007: Set objOL = Outlook.Application Set objDoc = objOL.ActiveInspector.WordEditor Set objWord = objDoc.Application Set objSel = objDoc.Windows(1).selection MsgBox objSel.Text -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Peter R." wrote in message ... It´s Outlook 2007, it´s a received message in the Inbox. A piece of tekst marked in a opened email message. How do I get a marked piece of text in a email into a string in my VBA ? |
#8
|
|||
|
|||
![]()
One more question, could this be any different in Outlook 2003 ? Thanks again!
"Sue Mosher [MVP-Outlook]" wrote: That's the easiest scenario to handle, because Word is always the email editor in Outlook 2007: Set objOL = Outlook.Application Set objDoc = objOL.ActiveInspector.WordEditor Set objWord = objDoc.Application Set objSel = objDoc.Windows(1).selection MsgBox objSel.Text -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Peter R." wrote in message ... It´s Outlook 2007, it´s a received message in the Inbox. A piece of tekst marked in a opened email message. How do I get a marked piece of text in a email into a string in my VBA ? |
#9
|
|||
|
|||
![]()
Outlook 2003 would be completely different, since the only time when Word would be used is if the message is in RTF format and Word is the editor. In fact, to get the selection from a received plain text message, you'd need a third-party library (Redemption).
-- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Peter R." wrote in message ... One more question, could this be any different in Outlook 2003 ? Thanks again! "Sue Mosher [MVP-Outlook]" wrote: That's the easiest scenario to handle, because Word is always the email editor in Outlook 2007: Set objOL = Outlook.Application Set objDoc = objOL.ActiveInspector.WordEditor Set objWord = objDoc.Application Set objSel = objDoc.Windows(1).selection MsgBox objSel.Text "Peter R." wrote in message ... It´s Outlook 2007, it´s a received message in the Inbox. A piece of tekst marked in a opened email message. How do I get a marked piece of text in a email into a string in my VBA ? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Put a selection in a textstring | Peter R.[_2_] | Outlook and VBA | 0 | December 5th 07 06:37 PM |
Contact selection in Journalentry | Bob Mixon | Outlook - General Queries | 3 | March 21st 07 12:52 AM |
Language selection does not take | ritter197 | Outlook - General Queries | 0 | October 23rd 06 11:35 PM |
Contact selection | DCL | Outlook - Using Contacts | 5 | September 15th 06 03:06 AM |
Message selection | Julieta Prandi | Add-ins for Outlook | 0 | March 30th 06 11:22 PM |