A Microsoft Outlook email forum. Outlook Banter

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.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Get selection into textstring



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old December 5th 07, 06:46 PM posted to microsoft.public.outlook.program_vba
Peter R.[_2_]
external usenet poster
 
Posts: 7
Default Get selection into textstring

How do I get a marked piece of text in a email into a string in my VBA ?
Thanks Peter.
Ads
  #2  
Old December 5th 07, 08:18 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Get selection into textstring

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  
Old December 5th 07, 09:07 PM posted to microsoft.public.outlook.program_vba
Peter R.[_2_]
external usenet poster
 
Posts: 7
Default Get selection into textstring

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  
Old December 5th 07, 10:12 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Get selection into textstring

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  
Old December 5th 07, 10:29 PM posted to microsoft.public.outlook.program_vba
Peter R.[_2_]
external usenet poster
 
Posts: 7
Default Get selection into textstring

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 How do I get a marked piece of text in a email into a string in my VBA ?
Thanks Peter.


  #6  
Old December 5th 07, 11:33 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Get selection into textstring

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  
Old December 6th 07, 05:38 AM posted to microsoft.public.outlook.program_vba
Peter R.[_2_]
external usenet poster
 
Posts: 7
Default Get selection into textstring

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  
Old December 6th 07, 06:45 AM posted to microsoft.public.outlook.program_vba
Peter R.[_2_]
external usenet poster
 
Posts: 7
Default Get selection into textstring

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  
Old December 6th 07, 05:50 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Get selection into textstring

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
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


All times are GMT +1. The time now is 09:14 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.