Solved

Opening an attachment

Posted on 1997-04-30
1
642 Views
Last Modified: 2013-12-04
Hi

I'm trying to read a MAPI-attachment with VC4.2
I've read in the help "Opening an Attachment" and it says:

1. Call the message's IMessage::GetAttachmentTable method to access its attachment table.
2. Call HrQueryAllRows to retrieve all rows in the table.
3. For each row:
 a. Open the attachment by passing the attachment number represented in the PR_ATTACH_NUM etc....

What I wonder is how do I get PR_ATTACH_NUM out of the Rows in the table? I have found nothing about this in the helpfiles, nor have I found some sample code.

Hope you can help me

Regards,

Andreas
0
Comment
Question by:cost
1 Comment
 
LVL 1

Accepted Solution

by:
strobert earned 100 total points
ID: 1397048
each row returned by HrQueryAllRows is basically a list of SRow's
(you actually get a SRowSet which has an array of SRow's)

each SRow has an array of SPropValue's (SRow.lpProps)

for each SPropValue, serach for the ulPropTag that is PR_ATTACH_NUM, and the Value piece should have the attach num to pass into OpenAttach.

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

This article describes how to programmatically preset the "Pages per Sheet" option that's available with most printer drivers.   This setting lets you do "n-Up" printing, where two, four, or more pages are printed on each sheet of paper. If your …
zlib is a free compression library (a DLL) on which the popular gzip utility is built.  In this article, we'll see how to use the zlib functions to compress and decompress data in memory; that is, without needing to use a temporary file.  We'll be c…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

910 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now