![]() ![]() ![]() Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback. Set myItems = Application.GetNamespace("MAPI").GetDefaultFolder(olFolderInbox).ItemsĬomboBox1.AddItem myItems.Item(x).Subjectįor more information about creating and using forms in the Visual Basic Editor, see the Visual Basic Editor Help. This reference contains conceptual overviews, programming tasks, samples, and references to guide you in developing solutions based on VBA. The following example shows how to fill a combo box control with the subjects of the items in the user's Inbox. Welcome to the Visual Basic for Applications (VBA) language reference for Office. You can also use controls to display information about Outlook items, folders, and other features of the Outlook object model. Body = "Please return this book as soon as possible." ![]() Subject = "Book overdue: " & TextBox2.Text Set myMail = Application.CreateItem(olMailItem) The following sample uses the text in two text boxes to add information to a message before sending it. When the user closes the form, the program uses the information in the form to set the properties of the mail message and then sends the message. For example, a program that creates a boilerplate mail message could use a Visual Basic for Applications form to allow the user to enter the specific information for the message to be sent. Your Visual Basic for Applications program can use a Visual Basic for Applications user form to gather information from your users your program can then use this information to set properties of new or existing Outlook items. Unlike an Outlook form, a Visual Basic for Applications form is not used to display an Outlook item, nor can a control on a Visual Basic for Applications form be bound to an item field. Use the Visual Basic Editor to design a form that allows your users to interact with your Microsoft Visual Basic for Applications (VBA) program. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |