vba code to open attachment item in ol2000 and save item

G

Guest

how to write vba code to open attachment file in *.awd format and save in
*.tif format in OL2000
 
D

Dennis Brown

What would be the syntax to get the name of the currently highlighted attachment in the attachment field (i.e. the one the cursor is on.)
I can use
oMyOutlook.ActiveInspector.CurrentItem.Attachments.Item(5).Display
to display the 5th attachment, but how do I get the name of the current item in the list, say attachment#14, if 14 is the attachment at the cursor position?
The screen reader I'm working with doesn't see the name as text, because it is an embedded object within the text field, so I want to grab the name with the object model and then announce it to the user that way.
I'm lost on the exact syntax path to get to that data!

--

Thanks,
Dennis
You can only work with attachments by saving them to the file system. You
would then have to automate an application that can open AWD files and save
them as TIF. The first part is shown at
http://www.slovaktech.com/code_samples.htm#StripAttachments. You'd have to
work out the second part yourself.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm
 
K

Ken Slovak - [MVP - Outlook]

I have no idea of how to get which attachment is selected.

Where do you get Attachment.Display? That's not in the Outlook object model.




What would be the syntax to get the name of the currently highlighted
attachment in the attachment field (i.e. the one the cursor is on.)
I can use
oMyOutlook.ActiveInspector.CurrentItem.Attachments.Item(5).Display
to display the 5th attachment, but how do I get the name of the current
item in the list, say attachment#14, if 14 is the attachment at the cursor
position?
The screen reader I'm working with doesn't see the name as text, because
it is an embedded object within the text field, so I want to grab the name
with the object model and then announce it to the user that way.
I'm lost on the exact syntax path to get to that data!
 
D

Dennis Brown

I believe it was Attachment.DisplayName? That was what I was asking, should the current attachment be something I could retrieve the name of? Perhaps with the Selection object?
I know under MailItem, they have Attachment, and I was hoping to get it that way, but again, I'm obviously doing something wrong with syntax. I'm just not sure what is the best approach to get that info--the attachment currently highlighted in the Attachment field.
Since the attachment is a RichEdit text field, would the Office library have something I can use in retrieving embedded objects from a rich edit field/document?

--

Thanks,
Dennis
I have no idea of how to get which attachment is selected.

Where do you get Attachment.Display? That's not in the Outlook object model.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


What would be the syntax to get the name of the currently highlighted attachment in the attachment field (i.e. the one the cursor is on.)
I can use
oMyOutlook.ActiveInspector.CurrentItem.Attachments.Item(5).Display
to display the 5th attachment, but how do I get the name of the current item in the list, say attachment#14, if 14 is the attachment at the cursor position?
The screen reader I'm working with doesn't see the name as text, because it is an embedded object within the text field, so I want to grab the name with the object model and then announce it to the user that way.
I'm lost on the exact syntax path to get to that data!
 
K

Ken Slovak - [MVP - Outlook]

As I said, I have no idea of how to get the currently selected attachment.
As far as I know you can't.




I believe it was Attachment.DisplayName? That was what I was asking,
should the current attachment be something I could retrieve the name of?
Perhaps with the Selection object?
I know under MailItem, they have Attachment, and I was hoping to get it
that way, but again, I'm obviously doing something wrong with syntax. I'm
just not sure what is the best approach to get that info--the attachment
currently highlighted in the Attachment field.
Since the attachment is a RichEdit text field, would the Office library
have something I can use in retrieving embedded objects from a rich edit
field/document?
 

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