![]() |
VBA access to controlelement in a form
Hello,
i adapted the form for contact and provided therein a drop-down control. This drop-down control has given values. The new Contact-Form is assigned to all contacts. I would like to access now by VBA (from Word) the drop down element. I would like to pick the possible values out those the drop-down control have. I would like to thus access the form directly. Not on the values the one contact has. Sorry for my english. |
VBA access to controlelement in a form
See http://www.outlookcode.com/article.aspx?ID=38, the section on unbound controls, for basic control syntax. The List or Column property of the control returns an array of values for the control rows and columns.
-- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Markus Beck" wrote in message ... Hello, i adapted the form for contact and provided therein a drop-down control. This drop-down control has given values. The new Contact-Form is assigned to all contacts. I would like to access now by VBA (from Word) the drop down element. I would like to pick the possible values out those the drop-down control have. I would like to thus access the form directly. Not on the values the one contact has. Sorry for my english. |
VBA access to controlelement in a form
Hallo Sue,
how do I get a Item(Object) of my "MassageClass"? How do I receive an object from my Custom form, which the Contact marked at present has? [...] Dim objOutlook As Outlook.Application Dim objExplorer As Explorer Dim objContact As ContactItem Set objOutlook = CreateObject("Outlook.Application") Set objExplorer = objOutlook.ActiveExplorer Set objContact = objExplorer.Selection(1) Set objPage = objContact.GetInspector.ModifiedFormPages("NameOfP age") Set objControl = objPage.Controls("NameOfComboBox") MyValue = objControl.Value [...] If I implement this code, I obtain only the present value of the ComboBox - thus the value that my contact in the field has. I would like to have however gladly all values of the ComboBox, which stand in the Custom MassageClass by default to selection. I access over VBA to Outlook. I cannot use VB-Script of examples. "Sue Mosher [MVP-Outlook]" schrieb im Newsbeitrag ... See http://www.outlookcode.com/article.aspx?ID=38, the section on unbound controls, for basic control syntax. The List or Column property of the control returns an array of values for the control rows and columns. "Markus Beck" wrote in message ... Hello, i adapted the form for contact and provided therein a drop-down control. This drop-down control has given values. The new Contact-Form is assigned to all contacts. I would like to access now by VBA (from Word) the drop down element. I would like to pick the possible values out those the drop-down control have. I would like to thus access the form directly. Not on the values the one contact has. Sorry for my english. |
VBA access to controlelement in a form
Repeating what I said earlier: The List or Column property of the [combo box] control returns an array of values for the control rows and columns.
-- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Markus Beck" wrote in message ... Hallo Sue, how do I get a Item(Object) of my "MassageClass"? How do I receive an object from my Custom form, which the Contact marked at present has? [...] Dim objOutlook As Outlook.Application Dim objExplorer As Explorer Dim objContact As ContactItem Set objOutlook = CreateObject("Outlook.Application") Set objExplorer = objOutlook.ActiveExplorer Set objContact = objExplorer.Selection(1) Set objPage = objContact.GetInspector.ModifiedFormPages("NameOfP age") Set objControl = objPage.Controls("NameOfComboBox") MyValue = objControl.Value [...] If I implement this code, I obtain only the present value of the ComboBox - thus the value that my contact in the field has. I would like to have however gladly all values of the ComboBox, which stand in the Custom MassageClass by default to selection. I access over VBA to Outlook. I cannot use VB-Script of examples. "Sue Mosher [MVP-Outlook]" schrieb im Newsbeitrag ... See http://www.outlookcode.com/article.aspx?ID=38, the section on unbound controls, for basic control syntax. The List or Column property of the control returns an array of values for the control rows and columns. "Markus Beck" wrote in message ... Hello, i adapted the form for contact and provided therein a drop-down control. This drop-down control has given values. The new Contact-Form is assigned to all contacts. I would like to access now by VBA (from Word) the drop down element. I would like to pick the possible values out those the drop-down control have. I would like to thus access the form directly. Not on the values the one contact has. Sorry for my english. |
All times are GMT +1. The time now is 11:32 AM. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com