Can get UserProperty Names but not Values?

>From C++ using UserProp->Name I can get the name of a UserProperty,
but UserProp->Value.bstrVal always returns nothing, anyone have any
ideas what I could be doing wrong and has anyone ever accessed
UserProperties from C++?


UserPropertiesPtr UserProps = Con->UserProperties;
if (UserProps->Count > 0)
{
    tot = UserProps->Count;
    UserPropertyPtr UserProp;
    for (i=1;i < tot + 1;i++)
    {
        UserProp = UserProps->Item(i);
        MessageBox(NULL,UserProp->Name,"Test - Name",MB_OK);
        char* sText;
        sText = (char*)UserProp->Value.bstrVal;
        MessageBox(NULL,sText,"Test - Value",MB_OK);
    }
}

0
adempsey (2)
10/12/2007 9:32:56 AM
outlook 87535 articles. 11 followers. Follow

4 Replies
399 Views

Similar Articles

[PageSpeed] 34

Adam Dempsey <adempsey@gmail.com> wrote:

>> From C++ using UserProp->Name I can get the name of a UserProperty,
> but UserProp->Value.bstrVal always returns nothing, anyone have any
> ideas what I could be doing wrong and has anyone ever accessed
> UserProperties from C++?

You might have better luck in the programming groups. 
microsoft.public.outlook.program_addins, 
microsoft.public.outlook.program_forms, microsoft.public.outlook.program_vba
-- 
Brian Tillman [MVP-Outlook] 

0
tillman1952 (16052)
10/12/2007 12:12:35 PM
Do you see the properties in MFCMAPI or OutlookSpy (click IMessage)?
Are you use you have a string property? What is the value of 
UserProp->Value.vt?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy  - Outlook, CDO
and MAPI Developer Tool

"Adam Dempsey" <adempsey@gmail.com> wrote in message 
news:1192181576.270690.52770@i13g2000prf.googlegroups.com...
> >From C++ using UserProp->Name I can get the name of a UserProperty,
> but UserProp->Value.bstrVal always returns nothing, anyone have any
> ideas what I could be doing wrong and has anyone ever accessed
> UserProperties from C++?
>
>
> UserPropertiesPtr UserProps = Con->UserProperties;
> if (UserProps->Count > 0)
> {
>    tot = UserProps->Count;
>    UserPropertyPtr UserProp;
>    for (i=1;i < tot + 1;i++)
>    {
>        UserProp = UserProps->Item(i);
>        MessageBox(NULL,UserProp->Name,"Test - Name",MB_OK);
>        char* sText;
>        sText = (char*)UserProp->Value.bstrVal;
>        MessageBox(NULL,sText,"Test - Value",MB_OK);
>    }
> }
> 


0
dmitry1 (75)
10/12/2007 4:57:00 PM
On 12 Oct, 17:57, "Dmitry Streblechenko" <dmi...@dimastr.com> wrote:
> Do you see the properties in MFCMAPI or OutlookSpy (click IMessage)?
> Are you use you have a string property? What is the value of
> UserProp->Value.vt?
>

I got it sorted in the end

_variant_t v;
v.Attach (UserProp->GetValue());
_bstr_t b = (_bstr_t)(v);

0
adempsey (2)
10/14/2007 4:40:45 PM
_bstr_t b = UserProp->getValue().bstrVal

0
10/15/2007 2:07:15 AM
Reply:

Similar Artilces:

How can I enarge the font size in a drop-down list?
1. How can I enarge the font size in a drop-down list? 2. How can I prevent someone from changing or deleting the formula in a cell? When I try to protect the cell it prevents the formula from being executed. Formulas still work when protected. If you are using data>validation you cannot change the font, you can use a macro that zooms http://www.contextures.com/xlDataVal08.html#Font -- Regards, Peo Sjoblom "BobH" <BobH@discussions.microsoft.com> wrote in message news:A63E65DE-CFB3-40FA-B1D8-0E576A436885@microsoft.com... > 1. How can I enarge the font size i...

Return minimum POSITVE value from range
Hi, Suppose I have a worksheet with the following data: (column1)......... (column2) Savings..................I.D. -243...................... 01 -205...................... 02 -165.......................03 -87.........................04 57..........................05 109........................06 205........................07 303........................08 What I need to do is look up the smallest -positive- number in the "Savings" column and the look over to the "I.D." column and retrieve the corresponding I.D. So in the above example, look up the value 57 and then re...

Pivot Table names
I have a pivot table and after some manipulation it is giving me what I desire. One question: is it possible to get rid of all the titles that start with "Sum of" and replace it with something else? Thank you. Right-click the field heading and select Field Settings, you can change it there. If you want to change Sum of Amt say to Amt, add a space at the end, else you will get a duplicate name error. -- __________________________________ HTH Bob <john.menken@ceridian.com> wrote in message news:dd61aba2-f441-4678-ae07-a182494b7911@33g2000yqm.googlegroups.com... >I have...

Can columns be protecteded by an assigned user?
In an attempt to streamline 4 separate worksheets into one, is it possible to setup 4 columns in one Excel worksheet, then protect each column to allow one user to edit their assigned column by unlocking and relocking it? Or is there a better alternative, i.e., linking a main worksheet to each of the four that will show the edits automatically in my main worksheet? You can use the Allow Users to edit Range feature to set up a worksheet so that specific areas can be edited by specifc users. You protect the entire sheet and allow a user to edit a specific range without a pass...

oops... Getting product name from other sheet
Which formula can I use to get product names to transfer onto other sheets? Like: Sheet1: ITEM# NAME T0589 Rose T0575 Lilly T0575 Tulip Sheet2: ITEM# NAME T0589 T0575 I would like for it to recognize the item# in sheet to and automatically look for the product name from sheet 2 and fill it in. I tried a few "IF" formulas, but w/out luck. Thanks for any help... -- Nicki Taylor =vlookup() looks like it would work ok. =if(a1="","",vlookup(a1,sheet2!a:b,2,false)) You may want to read Debra Dalgleish's notes: http://www...

OWA, can i put username without domain?
Hi all, I have 2 questions as follow: I just setup an exchange2003 as test. In owa, Do i have to put in my whole email address as the username or there is a way to shorten it to username only for login? I have this c1030af3 error when i try to get into public folders in ex. manager. But the problem solved by disable auto-protect in norton anti-virus. Is Norton conflict with exchange 2003? is there a fix for that? Thanks a lot all. Hi Derrick, Take a look at this KB Article: http://support.microsoft.com/kb/820378 It will explain how to edit the OWA Login.asp page to automatically i...

Can't View Downloaded Items to Review
In my transaction view, after connecting to my Bank, I usually have items that show up in my transactions list based on how many items were downloaded. I have 8 Items for Review, but they do not show up in the transaction list?!?!?! Try the following article: http://support.microsoft.com/default.aspx?scid=kb;en-us;316900&Product=mny "Dalton" <geoff@2bones.com> wrote in message news:e6EFv8vgDHA.520@tk2msftngp13.phx.gbl... > In my transaction view, after connecting to my Bank, I usually have items > that show up in my transactions list based on how many items were...

Can't create file: FAX.TIF
I keep getting this error message when I try to open faxes that come down over our server. Here is the entire message. Can't create file: FAX.TIF. Right click the folder you want to create the file in, and then click Properties on the shortcut menu to check your permissions for the folder. I have checked the properties for the Inbox and for the Office Document Imaging and all of that is fine. We were able to open faxes fine, then one day a Smiley bar appeared in Outlook and then we were not able to open the faxes anymore. Also, I have removed Outlook and reinstalled. I hav...

How can I update endnote cross-references in Word 2007 ?
I created a long document with many endnotes and some cross-references to these endnotes. When I insert a new endnote somewhere in the document, the following endnote numbers change but not the cross-reference numbers. This seems to be a bug in Word 2007 as it worked perfectly in my previous Word version. How can I update endnote cross-references in Word 2007 ? Ctrl+A, F9 should work in all versions of Word. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps.org "Joe56" <Joe56@discussions.microsoft.com> wro...

Finding an element by name in a schema
Is there an easy way to find an element by name given a XmlSchema object? Or do I have to parse the entire schema myself to search for it? Do I somehow need to use XmlSchemaXPath? If so, how? Thanks, -- Greg Maybe I need to be clearer here. Here is a sample schema fragment: <?xml version="1.0" encoding="utf-16"?> <xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> <xs:element name="NewDataSet" msdata:IsDataSet="t...

Showing orders with a certain value of a bit field?
I've included a custom field on the order form. It's a bit field with the values YES and NO. The default value is NO. Our employees use this field to tell the system, if an order has been complete and is ready for invoicing. (We do not want to use the system possibility of completing an order). I've made a custom view of orders, where the view criteria is, that the value of this bit field is NO. And another view where the view criteria is, that the value is YES. However, when I select these views, I cannot see any orders. Could someone please explain, what I'm doing wr...

Help! Can't Import Quicken 2001 Deluxe Data into MS Money 2004 Standard
Hello, I have a relatively new Compaq Desktop (2.5 GHz Celeron with 512 MB RAM). I have a Viewsonic Pocket PC and I wanted to use it to track my financial data so I purchased Money 2004 Standard. I tried several times to convert my Qucken Data (it's a big file--I've been using Quicken since 1995). My Quicken program is Quicken 2001 Deluxe. Anyway, the MS Money program started to convert and after a few minutes said: "Your Quicken file could not be converted. Money could not convert your Quicken file. You might have run out of disk space or system memory. Try closing othe...

can I use vlookup on an object (pictueres?)
I have a spec book in excel that has about 100 items. Each spec has detail data in a table that I use vlookup to get and fill in a form for the user print out. I need a way to insert a picture of the item based on a code the user inputs in a cell. really just like vlookup for pictures. A Vlookup formula can't return a picture, because pictures float over the worksheet, instead of residing in a cell. J.E. McGimpsey has some code for displaying a picture based on the contents of a cell: http://www.mcgimpsey.com/excel/lookuppics.html DB wrote: > I have a spec book in excel t...

Can't Reply messages................HELP
I cant seem to reply messages both in outlook 2003 and outlook 2007. every time i reply to a sender not in my address book the senders name appears on the "to" field but not the addresses. How do i fix this..... Help What happens when you send? The address is not shown if it is not part of the display name. When you right click the address and choose Outlook Properties, do you see their address then? -- Robert Sparnaaij [MVP-Outlook] Coauthor, Configuring Microsoft Outlook 2003 http://www.howto-outlook.com/ Outlook FAQ, HowTo, Downloads, Add-Ins and more http://w...

Getting form expression results to update to table.
The totals from the expressions in a couple fields on the form don't update to the table. They (the expressions) work correctly in the form, but they (the results of the expressions) don't appear on the table after clicking Update All. Does anyone know how ot fix this? Hi Peg, First, forms don't contain fields. They contain controls (most commonly textboxes) which may or may not be bound to fields in the form's recordsource. If they are bound to a field, changing the data in the form will change the underlying field in a table (unless the form's recordsource ha...

Cant get rid of large bottom margin when printing
I cannot stop large unprintable borders around the edge of an A4 page. Have adjusted settings in wordpad and in margins. New settings say the only border should be 0.01cm at the bottom. This has made no difference. Border is much larger at the bottom than the other sides. Any help gratefully received. That could be a limitation of your printer. Check your owner's manual. -- JoAnn Paules MVP Microsoft [Publisher] "Fangfur" <Fangfur@discussions.microsoft.com> wrote in message news:B3BB0A9B-0FC4-439C-9809-2FCEBD6E6E4D@microsoft.com... >I cannot stop large unprint...

How can I enlarge a document
I have just set up a 12 page - one page for each month - planner for 2010. I used a wallet sized Publisher calendar format. I want my planner to fit in an A5 sized diary so I need to enlarge it before printing. I have spent a lot of time experimenting with the page set up in the print menu etc but am unable to do this. Can anyone advise me about this please? I would also like to know if I can change the format of all 12 pages simutaneously as I had to do this page by page ( I wanted to reduce the size of the headings for each month to make more room for space dedicated to each ...

can i create a guestbook using microsoft publisher?
I am trying to create a web page with a guestbook for visitors to sign. Can I create a guestbook using microsoft publisher 2007? Quicker answers may be found at microsoft.public.publisher.webdesign ? "Jill B" <Jill B@discussions.microsoft.com> wrote in message news:ED514120-CB19-4E64-9E0B-865140EB0B84@microsoft.com... >I am trying to create a web page with a guestbook for visitors to sign. Can >I > create a guestbook using microsoft publisher 2007? Jill, No. A guestbook will require (at least in most cases) a database as well as either php or asp. Try www.sou...

Can't find e-mail address in my organization
I need to add an e-mail address in my Exchange 2003 server. When I add it to a user, it says "This e-mail address already exists in this organization. ID no: c10312e7 Microsoft Active Directory - Exchange Extension". I looked at all users but did not see it any user profile. Is there a way to search for the user that has this address assigned to it? we have just answered same question, Where is this email address posted by Jamie Dawes (-: Just to make it easier for you, here are the steps for locating an smtp address which is being used already go to ADUC Click on Find ob...

"update ta set ta.ra=1 from tablename ta" how can pass in Access
is it can be pass in the Access? how to change? thanks! update ta set col = t.col from ta,(select id,max(col) col from tb group by id) t where ta.id = t.id UPDATE ta SET col = DMAX("col" , "tb", "id=" & id ) or (untested) UPDATE ta INNER JOIN tb ON ta.id=tb.id SET ta.col = tb.col WHERE tb.col = ( SELECT MAX(col) FROM tb AS c WHERE c.id = ta.id ) A Jet query implying an aggregate (elsewhere than in a sub-query in the WHERE clause) is NOT upd...

How can I access my Outlook from school with my Outlook from home.
I have an outlook account through my school and I would like to access it without logging into the web-based outlook at home. I have Outlook on my home computer but I have never used it before. Is it possible to have my school outlook email show up in my home outlook? Ask your email administrator. They can give you the details. -- Sue Mosher, Outlook MVP Author of Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "Marie" <Marie@discussions.microsoft.com> wrote in message ...

Can't attach photos to email
I have Vista. I just tried to email someone & I attached some scanned photos from "Pictures" but keep getting a message saying that "some of the files could not be found and won't be sent." I closed out all other applications. Suggestions? shedrums wrote: > I have Vista. I just tried to email someone & I attached some scanned photos > from "Pictures" but keep getting a message saying that "some of the files > could not be found and won't be sent." I closed out all other applications. > Suggestions? You get ...

Opening Form Based on Value Input
I am wanting to open a form within a form based on the value input on a field on the main form. How do I accomplish this? I am a newbie to Access 2007. Thank you!!! Don't have 2007, but in 2003 you could change which form a subform control was displaying with <subform>.SourceObject = "XXXX" "Deb" wrote: > I am wanting to open a form within a form based on the value input on a field > on the main form. How do I accomplish this? I am a newbie to Access 2007. > > Thank you!!! ...

Send/Receive message
Hi. When my Outlook 2003 Send/Receive progress window appears, it used to have an indicator showing the number of messages downloaded out of a total number to be downloaded. This does not appear now, can someone tell me how I activate this feature again? The window still appears with the Send/Receive ISP names but not the number of messages etc. Thanks. Griff. ...

Why am I getting a #VALUE! Error?
Previously I had this formula which was working fine: =IF(AND(OR($E$5=1,$E$5=2),$E$2="...3/12...",$E$3=" inch"),VLOOKUP($E$6,lookup!$C$3:$D$19,2,0),IF(AND($E$5=3,$E$2="...3/12...",$E$3=" inch"),VLOOKUP($E$6,lookup!$E$3:$F$19,2,0),"")) But after I add another part onto the end of the formula I am no getting a #VALUE! error (even though, if I enter information in th referenced cells, it seems to work fine and return the correc numbers): =IF(AND(OR($E$5=1,$E$5=2),$E$2="...3/12...",$E$3=" inch"),VLOOKUP($E$6,lookup!$C$3:$D$19...