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. StrSenderID = oPA.GetProperty(PR_SENT_REPRESENTING_ENTRYID) Set oPA = myOlSel.Item(x).PropertyAccessor ' then get the address entry to display the sender name. ' For other items, use the property accessor to get sender ID, ' For appointment item, use the Organizer property. Reopen your Outlook and try to use quick print again. The default printer will display a green checkmark icon. Under the Printers section, right-click the preferred printer to select Set as default printer. (In Outlook 2007, just click File > Print ). And then click File > Print > Print Options. ' For mail item, use the SenderName property.ĮlseIf myOlSel.Item(x).Class = OlObjectClass.olAppointment Then Open Control Panel using the Windows search box and click on Devices and Printers. Select the email message that you want to print the specified pages. If myOlSel.Item(x).Class = OlObjectClass.olMail Then Sub GetSelectedItems()Ĭonst PR_SENT_REPRESENTING_ENTRYID As String = _ It uses the Count property and Item method of the Selection object, returned by the Explorer.Selection property, to display the senders of all messages that are selected in the active explorer. The following Microsoft Visual Basic for Applications (VBA) example displays the sender of each selected item in the active explorer. The Selection collection contains ConversationHeader objects only if you specify olConversationHeaders in the GetSelection method of the Selection object. For example, the Item method can return an AppointmentItem, MailItem, MeetingItem, or TaskItem in the Inbox folder, depending on the value of the Selection.Location property. Remarksĭo not make any assumptions about the Item method return type your code should be able to handle multiple item types or a ConversationHeader object. Parameters NameĮither the index number of the object, or a value used to match the default property of an object in the collection.Īn Object that represents the specified item or conversation header. SyntaxĮxpression A variable that represents a ' Selection' object. Returns a Microsoft Outlook item or conversation header from the selection.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |