We don't have a specific forum for VBA - you can ask it here and if i don't know the answer, i'll send you to msdn. Simple stuff is usually not a problem as I do know some VBA but I'm not an expert dev like the guys in the MSDN forum.
We don't have a specific forum for VBA - you can ask it here and if i don't know the answer, i'll send you to msdn. Simple stuff is usually not a problem as I do know some VBA but I'm not an expert dev like the guys in the MSDN forum.
Ok, thanks. I used the link and went to MSDN Outlook 2010 Dev - where I got enough help to start me off. But one thing I haven't yet discovered is the (Rules) property associated with the Sender (as opposed to .From) -
(hope this is clear)
- with inetphone within the sender's address
and with voicemail in the subject
(etc)
I have tried rl.Conditions.SenderAddress and rl.Conditions.SenderAddress.Address
but these are null, as is rl.Conditions.From.Recipients.Item(1).Address for this particular rule.
From is the display name and senderaddress is the underlying email address. AFAIK, oRule.Conditions.SenderAddress.Address would be the proper way to pass an address value.
What I'm trying is to get familiar with the OL 2010 object model + to document ~ 200 rules in an OL2010 store. To begin, I am using VBA - I intend to use C# and VSTO later.
afaik the Rules have been set up simply with a condition using From (rather than Sender) - the one I pictured handles forwarding of voicemail from a VOIP system.
If oCondition.ConditionType = olConditionSenderAddress Then
sOutput = sOutput & Chr(9) & "Sender:" & (oRule.Conditions.SenderAddress.Enabled) & vbCrLf
End If
the result is Sender: True - not what I expected!
or, as I have it,
Code:
If oCondit.ConditionType = olConditionSenderAddress Then
If rl.Conditions.SenderAddress.Enabled = True Then
Debug.Print (vbTab & "Sender: " & rl.Conditions.SenderAddress.Address)
End If
End If
Unrelated, but something I miss from OL2003, I can't see the email header info as I used to. Do I need to use OutlookSpy to do this now?
I don't recall the specifics of that code - someone gave it to me. It doesn't work in Outlook 2013 so I can't see what it does. (It may not like my profile with 5 exchange mailboxes + a few other accounts). I'll load an Outlook 2010 VM and test it to refresh my memory.
Thx again - I eventually discovered the Options from the opened message, but configuring the QAT is much better.
I'll have a better look at the headers and see if I can get at them all from code - Visual Studio is much easier for me so I may curtail the VBA experience.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.