June 26, 2000 09:41 AM

Working with Selected Items

Rating: (0)
Windows IT Pro
InstantDoc ID #9032
In the Summer 2000 issue, I showed you how to use Microsoft Outlook's ActiveWindow object to build a function that always returns the selected item, whether you're looking at an open Outlook item or an Outlook folder. This time, I show you how to work with selections that contain multiple items in the same folder. This useful technique lets you quickly create routines that change only a few Outlook items at a time instead of a whole folderful of them.

Su...

ARTICLE TOOLS

You must be a paid Professional Member to access this entire article.

Already a Professional Member? Please log in now:

NOT A PROFESSIONAL MEMBER? YOU CHOOSE:

Monthly or Annual

Professional Membership

VIP Membership

Compare Member Benefits

Add a Comment

A common problem when moving mail between different mail applications or when migrating from other applications to outlook is the received date is reset to the date the mail is moved.

Can you offer a suggestion on how I might adapt this macro to reset the received date to the sent date?

Anonymous User 2/1/2005 8:40:04 PM


Terrific help this article.

I have utilised the methods to generate a macro that passes information from a selected contact into a word template.
I am having trouble passing the phone numbers to variables

Dim strFullName
Dim strCompanyName
Dim strFirstName
Dim strBusinessFax

Set objApp = CreateObject("Outlook.Application")
'Set objSelection = objApp.ActiveExplorer.Selection
Set objItem = objApp.ActiveExplorer.Selection
strDate = CStr(Date)
'MsgBox "Date: " & strDate

strLetter = "Bookmarks.dot"

'strMsg = objItem.Phone3

MsgBox strMsg
For Each objItem In objSel
strFullName = objItem.FullName
strCompanyName = objItem.CompanyName
strFirstName = objItem.FirstName
Set strBusinessFax = objItem.Phone3
Next

the codes a bit messy and i have to weed out the superflous bits yet but the problem i get is a message saying the property or method is not supported for the object type when it gets to the businessfax line (last line i have included here)

Any suggestions would be appreciated

Ken



kenarm10/21/2004 12:49:22 AM


There is a lot on moving messages between folders here:

Check out this great tutorial on using Microsoft Outlook for managing your ebay & amazon sales, or use it as an Outlook programming quickstart:

http://www.321books.co.uk/ebooks/outlook-vba-tutorial.htm



mal4mac9/17/2004 3:54:33 AM


Jerome, Outlook itself provides no such objects, although if you're using WordMail as the editor, you can use the Selection object from the WordEditor. YOu might want to take a look at the capabilities of the SafeInspector object from the Redemption library at http://www.dimastr.com/redemption/

SUE8/19/2004 6:41:39 PM


Hello,

Congratulations for your article ! I am currently in the need of a macro which get the text selected in an email. Can I get this with the Selection Object or is there a special way to copy the selected text in a string ?

Thanks for your help and the quality of your work,
Regards


Jerome Chellet 3/16/2004 1:15:14 AM


Ruben, you'd use the same Selection technique, just using a different property, DueDate. You can use the Date() function to return today's date.

Sue Mosher 3/3/2004 7:50:46 AM


Is there a way to select a number of items in Tasks folder and change the past due date to current date?

Ruben4/23/2003 12:32:44 PM


when we handle mail itmes in Outlook using VB, the method 'Move'

Liam5/18/2001 12:22:38 AM


You must log on before posting a comment.

Are you a new visitor? Register Here

windows server 2008 login scripts

I have 2 win2k8 servers one pdc and bdc. The domain is exampledom.com They are connected to 2 iscsi luns which replicate each other. We are running ac...222-96118

advertisement

GOOGLE LINKS
SPONSORED LINKS
FEATURED LINKS

White Papers

Your remote offices contain valuable electronic data – are they adequately protected? Learn how proven technologies can reliably and cost-effectively back up a branch office from a central location, in real time, to disk or tape, and even utilize existing backup solutions.

Downloads

PacketTrap IT is a comprehensive and affordable network management and application monitoring solution that solves problems associated with bandwidth, network and application performance, and connectivity. Gain insight into your network - try PacketTrapIT free for 21 days!

Web Seminars

IT administrators have to solve a myriad of problems. This web seminar outlines the ten most common systems management pains - including managing highly distributed systems and dealing with data theft/loss – and the best practices to address each.

eLearning Series

We bring the experts direct to you to share their real-world perspective and expertise. During each event, three sessions stream in real time, so you can learn, ask questions, and get solutions.
Upcoming event: Getting the Most with Exchange 2010 with Paul Robichaux

Subscribe to Windows IT Pro!

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.