Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBA IIF Statement in Outlook 2003 2

Status
Not open for further replies.

MichaelF81

Programmer
Sep 20, 2005
178
US
OK, I have a radio button called "reqNo" and if it is set to true, I want a field called "Required" to add "user@domain.com" to the required user field. If "reqNo" is set to false (which it is by default) I want it to not add the e-mail address.

IIf( expr , truepart , falsepart )

That is how it should work, I have set-it up and it does not. Any ideas?




"Adults are just obsolete children and the hell with them." - Dr. Seuss
 
Code:
Function Item_Send()

If Item.UserProperties("chkbYes").value = True Then
	Item.RequiredAttendees = Item.RequiredAttendees & "; user@domain.com"		
	Item_Send = True
Else
	Item_Send = True
End If

End Function

Outlook will not display the message unless I double click it. I get the follow error

"This item contains active content that cannot be displayed in the Reading Pane. Open the item to read its contents."

Er, any ideas?




"Adults are just obsolete children and the hell with them." - Dr. Seuss
 
what a pain, I will read those when I get home. Thanks a lot for all of your help! I will let you know what happens!

Enjoy the stars guys!




"Adults are just obsolete children and the hell with them." - Dr. Seuss
 
That is fine, I hated this stupid form anyways.

Thanks a lot for your help again!

Yes, I love it too, my alias on non-professional boards is DrSeussFreak ;)




"Adults are just obsolete children and the hell with them." - Dr. Seuss
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top