Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Run a VB macro on text selected in the outlook preview pane

Posted on 2006-03-22
5
Medium Priority
?
782 Views
Last Modified: 2012-08-13
Hi,

I want to write a vb macro that creates a new email from text i have selected in the preview pane (olPreview i think) however I am pretty new to outlook. How can I co about getting the selected text into a string so that i can then generate a new email from this text (I have generated emails before).

Any advice or pointers would be great.

Thanks,

hallz.
0
Comment
Question by:hallz
  • 3
  • 2
5 Comments
 

Author Comment

by:hallz
ID: 16263350
Note: I think it is actually called the 'Reading Pane' - the thing i need data from is the reading pane which sits under your list of emails in outlook.
0
 
LVL 76

Accepted Solution

by:
David Lee earned 1000 total points
ID: 16291895
Hi hallz,

I know of no way to get the selected text from the Reading pane.  If you want to get the selected text from the current message window and are willing to use Redemption, then this will do the trick: http://www.dimastr.com/redemption/safeinspector.htm

Cheers!
0
 

Author Comment

by:hallz
ID: 16299752
The closest thing I have found is this

http://support.microsoft.com/?kbid=240935

There is probably some way to access the selection higher up somewhere in the api's, but this will be sufficient for my project.

Thanks for posting.
0
 
LVL 76

Expert Comment

by:David Lee
ID: 16306462
hallz,

The material in that link isn't even close to what you indicated you were looking for.  That code is for getting the currently selected item (e.g. message, contact, appointment, etc.) in a list of items.  It has nothing at all to do with returning text selected in the reading pane or the body of the message.  Did I misunderstand what you were looking for?
0
 

Author Comment

by:hallz
ID: 16319541
Hi BlueDevilFan,

I think you understood, I am simply writing a script to process a section of an email message, selected text would have been more convenient but as the message content is system generated I can find the information with some code and process from there.

Thanks for your Help,

hallz.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question