Blind Outlook User & Objects

D

Dennis Brown

Hi All,
I'm a blind computer user that uses a screen reader that has a proprietary
scripting language. These scripts can access Office objects and get the
data that otherwise would be off limits to the blind (i.e. graphic icons,
screen data, etc.)
I know some VB, and I understand the OOP concept, but am fuzzy on syntax.
If I want to get the number of attachments on the currently opened message,
I assign
Outlook.Application.ActiveInspector.CurrentItem.Attachments.Count
to an integer variable.
and if I want to display the 3rd attachment, I assign the following to a
string variable:
Outlook.Application.ActiveInspector.CurrentItem.Attachments.Item(3).Display
then use the screen reader's Say() function to announce it via the sound
card.
Say("The total# of attachments is: "+IntToString(iMyIntegerVariable))
Say("The third attachment is: "+sMyStringVariable)
Now, if I want to select that 3rd item (just as if you sighted users clicked
the mouse on the 3rd attachment in an Outlook 2003 open message with
multiple attachments), how would I do that? Would I use the Selection
object? Can I get an example, even if it is within VB code?
 
G

Guest

You can't open the attachment via the Object Model, if that is what you are
trying to do. If you just want the Attachment object, you can retrieve it
from the Attachments collection using the Item method by passing the Index
number you want. Then you can save it to a file (and then open it from the
file system using the Shell command) or get the display name, but not much
else.
 
D

Dennis Brown

Hi Eric,
That was what I was wanting to do.
So how does Outlook process it if the user clicks on the 3rd item in the
Attachment field? Does it use a Shell-type function?
 
G

Guest

I can't speak for the mysterious inner-workings of Outlook, but I assume like
most Windows apps it determines the registered application for that file type
and uses some Win32API function to open it.
 
D

Dennis Brown

So using something like the Action object's Execute wouldn't then sent it to
the normal registered filetype functions? I'm no doubt demonstrating my
ignorance here, but it'd be nice to be able to have the open/or/save dialog
pop up when selecting a particular attachment.
 
G

Guest

No, Actions are restricted to the typical things you do with an Outlook item,
such as Reply, Forward, etc. Custom Actions are generally used with custom
forms.

I'm sure Microsoft's intent when they limited the custom programming options
with attachments is a good thing - imagine what bad code could do if there
was the ability to launch an .exe file directly from the e-mail message.
Virus propogation would be so much easier...
 
S

Sue Mosher [MVP-Outlook]

Outlook first saves the item to a temporary location -- C:\Documents and Settings\%username%\Local Settings\Temporary Internet Files\OLKxxx, where OLKxxx is a folder name that Outlook generates.

My guess is that it then invokes a shell function and lets that routine figure out which application to use. There's no reason you couldn't write something to do the same thing.
--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top