Jump to content

Outlook Constants


lod3n
 Share

Recommended Posts

Not sure if these have already been posted, but this makes translating Outlook VBA code to AutoIt a breeze.

; Outlook Constants

; OlActioncopy Like Constants 
Global Const $olReply       = 0
Global Const $olReplyAll    = 1
Global Const $olForward     = 2
Global Const $olReplyFolder = 3
Global Const $olRespond     = 4

; OlActionReplyStyle Constants 
Global Const $olOmitOriginalText    = 0
Global Const $olEmbedOriginalItem   = 1
Global Const $olIncludeOriginalText = 2
Global Const $olIndentOriginalText  = 3

; OlActionResponseStyle Constants 
Global Const $olOpen   = 0
Global Const $olSend   = 1
Global Const $olPrompt = 2

; OlActionShowOn Constants 
Global Const $olDontShow       = 0
Global Const $olMenu           = 1
Global Const $olMenuAndToolbar = 2

; OlAttachmentType Constants 
Global Const $olByValue      = 1
Global Const $olByReference  = 4
Global Const $olEmbeddedItem = 5
Global Const $olOLE          = 6

; OlBusyStatus Constants 
Global Const $olFree        = 0
Global Const $olTentative   = 1
Global Const $olBusy        = 2
Global Const $olOutOfOffice = 3

; OlDaysOfWeek 
Global Const $olSunday =1
Global Const $olMonday =2
Global Const $olTuesday =4
Global Const $olWednesday =8
Global Const $olThursday =16
Global Const $olFriday =32
Global Const $olSaturday =64

; OlDefaultFolders Constants
Global Const $olFolderDeletedItems = 3
Global Const $olFolderOutbox  = 4
Global Const $olFolderSentMail  = 5
Global Const $olFolderInbox   = 6
Global Const $olFolderCalendar  = 9
Global Const $olFolderContacts  = 10
Global Const $olFolderJournal  = 11
Global Const $olFolderNotes   = 12
Global Const $olFolderTasks   = 13

; OlFlagStatus Constants 
Global Const $olNoFlag  = 0
Global Const $olFlagComplete = 1
Global Const $olFlagMarked  = 2

; OlFolderDisplayMode Constants 
Global Const $olFolderDisplayNormal  = 0
Global Const $olFolderDisplayFolderOnly  = 1
Global Const $olFolderDisplayNoNavigation = 2

; OlFormRegistry Constants 
Global Const $olDefaultRegistry  = 0
Global Const $olPersonalRegistry  = 2
Global Const $olFolderRegistry  = 3
Global Const $olOrganizationRegistry = 4

; OlGender Constants 
Global Const $olUnspecified = 0
Global Const $olFemale = 1
Global Const $olMale  = 2

; OlImportance Constants 
Global Const $olImportanceLow = 0
Global Const $olImportanceNormal = 1
Global Const $olImportanceHigh = 2

; OlInspectorClose Constants 
Global Const $olSave   = 0
Global Const $olDiscard  = 1
Global Const $olPromptForSave = 2

; OlItems Constants 
Global Const $olMailItem  = 0
Global Const $olAppointmentItem = 1
Global Const $olContactItem  = 2
Global Const $olTaskItem  = 3
Global Const $olJournalItem  = 4
Global Const $olNoteItem  = 5
Global Const $olPostItem  = 6

; OlJournalRecipientsType Constants 
Global Const $olAssociatedContact = 1 

; OlMailingAddress Constants 
Global Const $olNone  = 0
Global Const $olHome  = 1
Global Const $olBusiness = 2
Global Const $olOther  = 3

; OlMailRecipientType Constants 
Global Const $olOriginator = 0
Global Const $olTo  = 1
Global Const $olCC  = 2
Global Const $olBCC  = 3

; OlMeetingRecipientType Constants 
Global Const $olOrganizer = 0
Global Const $olRequired = 1 
Global Const $olOptional = 2
Global Const $olResource = 3

; OlMeetingResponse Constants 
Global Const $olMeetingTentative = 2
Global Const $olMeetingAccepted = 3
Global Const $olMeetingDeclined = 4

; OlMeetingStatus Constants 
Global Const $olNonMeeting  = 0
Global Const $olMeeting  = 1
Global Const $olMeetingReceived = 3
Global Const $olMeetingCanceled = 5

; OlNoteColor Constants 
Global Const $olBlue  = 0
Global Const $olGreen  = 1
Global Const $olPink  = 2
Global Const $olYellow = 3
Global Const $olWhite  = 4

; OlRecurrenceType Constants 
Global Const $olRecursDaily  = 0
Global Const $olRecursWeekly = 1
Global Const $olRecursMonthly = 2
Global Const $olRecursMonthNth = 3
Global Const $olRecursYearly = 5
Global Const $olRecursYearNth = 6

; OlRemoteStatus Constants 
Global Const $olRemoteStatusNone = 0
Global Const $olUnMarked  = 1
Global Const $olMarkedForDownload = 2
Global Const $olMarkedForCopy = 3
Global Const $olMarkedForDelete = 4

; OlResponseStatus Constants 
Global Const $olResponseNone  = 0
Global Const $olResponseOrganized  = 1
Global Const $olResponseTentative  = 2
Global Const $olResponseAccepted  = 3
Global Const $olResponseDeclined  = 4
Global Const $olResponseNotResponded = 5

; OlSaveAsType Constants 
Global Const $olTXT  = 0
Global Const $olRTF  = 1
Global Const $olTemplate = 2
Global Const $olMSG  = 3
Global Const $olDoc  = 4

; OlSensitivity Constants 
Global Const $olNormal  = 0
Global Const $olPersonal  = 1
Global Const $olPrivate  = 2
Global Const $olConfidential = 3

; OlTaskDelegationState Constants 
Global Const $olTaskNotDelegated  = 0
Global Const $olTaskDelegationUnknown = 1
Global Const $olTaskDelegationAccepted = 2
Global Const $olTaskDelegationDeclined = 3

; OlTaskOwnerShip Constants 
Global Const $olNewTask  = 0
Global Const $olDelegatedTask = 1
Global Const $olOwnTask  = 2

; OlTaskRecipientType Constants 
Global Const $olUpdate  = 1
Global Const $olFinalStatus  = 2

; OlTaskResponse Constants 
Global Const $olTaskSimple = 0
Global Const $olTaskAssign = 1
Global Const $olTaskAccept = 2
Global Const $olTaskDecline = 3

; OlTaskStatus Constants 
Global Const $olTaskNotStarted = 0
Global Const $olTaskInProgress = 1
Global Const $olTaskComplete = 2
Global Const $olTaskWaiting  = 3
Global Const $olTaskDeferred = 4

; OlTrackingStatus Constants 
Global Const $olTrackingNone  = 0
Global Const $olTrackingDelivered  = 1
Global Const $olTrackingNotDelivered = 2
Global Const $olTrackingNotRead  = 3
Global Const $olTrackingRecallFailure = 4
Global Const $olTrackingRecallSuccess = 5
Global Const $olTrackingRead  = 6
Global Const $olTrackingReplied  = 7

; OlUserPropertyType Constants 
Global Const $olText  = 1
Global Const $olNumber = 3
Global Const $olDateTime = 5
Global Const $olYesNo  = 6
Global Const $olDuration = 7
Global Const $olKeywords = 11
Global Const $olPercent = 12
Global Const $olCurrency = 14
Global Const $olFormula = 18
Global Const $olCombination = 19

[font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font]

Link to comment
Share on other sites

And in the spirit of "teaching them to fish"...

Here is a method of generating these constants for other COM interfaces: Extract Enum Constants and create Au3 constants. Note: you may need to download and resister tlbinf32.dll -- instructions in base post.

Using JerryD's version in reply 7, this command:

CreateIncludeFile('Outlook.Application', "au3", 'Outlook.au3', True)

Creates this:

CODE

;

;Enumerated Constants for CoClass "Outlook.Application"

;Extracted from "C:\Program Files\Microsoft Office\OFFICE11\msoutl.olb"

;

;OlActioncopyLike

Const $olReply = 0

Const $olReplyAll = 1

Const $olForward = 2

Const $olReplyFolder = 3

Const $olRespond = 4

;OlActionReplyStyle

Const $olOmitOriginalText = 0

Const $olEmbedOriginalItem = 1

Const $olIncludeOriginalText = 2

Const $olIndentOriginalText = 3

Const $olLinkOriginalItem = 4

Const $olUserPreference = 5

Const $olReplyTickOriginalText = 1000

;OlActionResponseStyle

Const $olOpen = 0

Const $olSend = 1

Const $olPrompt = 2

;OlActionShowOn

Const $olDontShow = 0

Const $olMenu = 1

Const $olMenuAndToolbar = 2

;OlAttachmentType

Const $olByValue = 1

Const $olByReference = 4

Const $olEmbeddeditem = 5

Const $olOLE = 6

;OlBusyStatus

Const $olFree = 0

Const $olTentative = 1

Const $olBusy = 2

Const $olOutOfOffice = 3

;OlDaysOfWeek

Const $olSunday = 1

Const $olMonday = 2

Const $olTuesday = 4

Const $olWednesday = 8

Const $olThursday = 16

Const $olFriday = 32

Const $olSaturday = 64

;OlDefaultFolders

Const $olFolderDeletedItems = 3

Const $olFolderOutbox = 4

Const $olFolderSentMail = 5

Const $olFolderInbox = 6

Const $olFolderCalendar = 9

Const $olFolderContacts = 10

Const $olFolderJournal = 11

Const $olFolderNotes = 12

Const $olFolderTasks = 13

Const $olFolderDrafts = 16

Const $olPublicFoldersAllPublicFolders = 18

Const $olFolderConflicts = 19

Const $olFolderSyncIssues = 20

Const $olFolderLocalFailures = 21

Const $olFolderServerFailures = 22

Const $olFolderJunk = 23

;OlDisplayType

Const $olUser = 0

Const $olDistList = 1

Const $olForum = 2

Const $olAgent = 3

Const $olOrganization = 4

Const $olPrivateDistList = 5

Const $olRemoteUser = 6

;OlEditorType

Const $olEditorText = 1

Const $olEditorHTML = 2

Const $olEditorRTF = 3

Const $olEditorWord = 4

;OlFlagStatus

Const $olNoFlag = 0

Const $olFlagComplete = 1

Const $olFlagMarked = 2

;OlFolderDisplayMode

Const $olFolderDisplayNormal = 0

Const $olFolderDisplayFolderOnly = 1

Const $olFolderDisplayNoNavigation = 2

;OlFormRegistry

Const $olDefaultRegistry = 0

Const $olPersonalRegistry = 2

Const $olFolderRegistry = 3

Const $olOrganizationRegistry = 4

;OlGender

Const $olUnspecified = 0

Const $olFemale = 1

Const $olMale = 2

;OlImportance

Const $olImportanceLow = 0

Const $olImportanceNormal = 1

Const $olImportanceHigh = 2

;OlInspectorClose

Const $olSave = 0

Const $olDiscard = 1

Const $olPromptForSave = 2

;OlItemType

Const $olMailItem = 0

Const $olAppointmentItem = 1

Const $olContactItem = 2

Const $olTaskItem = 3

Const $olJournalItem = 4

Const $olNoteItem = 5

Const $olPostItem = 6

Const $olDistributionListItem = 7

;OlJournalRecipientType

Const $olAssociatedContact = 1

;OlMailingAddress

Const $olNone = 0

Const $olHome = 1

Const $olBusiness = 2

Const $olOther = 3

;OlMailRecipientType

Const $olOriginator = 0

Const $olTo = 1

Const $olCC = 2

Const $olBCC = 3

;OlMeetingRecipientType

Const $olOrganizer = 0

Const $olRequired = 1

Const $olOptional = 2

Const $olResource = 3

;OlMeetingResponse

Const $olMeetingTentative = 2

Const $olMeetingAccepted = 3

Const $olMeetingDeclined = 4

;OlMeetingStatus

Const $olNonMeeting = 0

Const $olMeeting = 1

Const $olMeetingReceived = 3

Const $olMeetingCanceled = 5

;OlNetMeetingType

Const $olNetMeeting = 0

Const $olNetShow = 1

Const $olExchangeConferencing = 2

;OlNoteColor

Const $olBlue = 0

Const $olGreen = 1

Const $olPink = 2

Const $olYellow = 3

Const $olWhite = 4

;OlObjectClass

Const $olApplication = 0

Const $olNamespace = 1

Const $olFolder = 2

Const $olRecipient = 4

Const $olAttachment = 5

Const $olAddressList = 7

Const $olAddressEntry = 8

Const $olFolders = 15

Const $olItems = 16

Const $olRecipients = 17

Const $olAttachments = 18

Const $olAddressLists = 20

Const $olAddressEntries = 21

Const $olAppointment = 26

Const $olMeetingRequest = 53

Const $olMeetingCancellation = 54

Const $olMeetingResponseNegative = 55

Const $olMeetingResponsePositive = 56

Const $olMeetingResponseTentative = 57

Const $olRecurrencePattern = 28

Const $olExceptions = 29

Const $olException = 30

Const $olAction = 32

Const $olActions = 33

Const $olExplorer = 34

Const $olInspector = 35

Const $olPages = 36

Const $olFormDescription = 37

Const $olUserProperties = 38

Const $olUserProperty = 39

Const $olContact = 40

Const $olDocument = 41

Const $olJournal = 42

Const $olMail = 43

Const $olNote = 44

Const $olPost = 45

Const $olReport = 46

Const $olRemote = 47

Const $olTask = 48

Const $olTaskRequest = 49

Const $olTaskRequestUpdate = 50

Const $olTaskRequestAccept = 51

Const $olTaskRequestDecline = 52

Const $olExplorers = 60

Const $olInspectors = 61

Const $olPanes = 62

Const $olOutlookBarPane = 63

Const $olOutlookBarStorage = 64

Const $olOutlookBarGroups = 65

Const $olOutlookBarGroup = 66

Const $olOutlookBarShortcuts = 67

Const $olOutlookBarShortcut = 68

Const $olDistributionList = 69

Const $olPropertyPageSite = 70

Const $olPropertyPages = 71

Const $olSyncObject = 72

Const $olSyncObjects = 73

Const $olSelection = 74

Const $olLink = 75

Const $olLinks = 76

Const $olSearch = 77

Const $olResults = 78

Const $olViews = 79

Const $olView = 80

Const $olItemProperties = 98

Const $olItemProperty = 99

Const $olReminders = 100

Const $olReminder = 101

Const $olConflict = 102

Const $olConflicts = 103

;OlOutlookBarViewType

Const $olLargeIcon = 0

Const $olSmallIcon = 1

;OlPane

Const $olOutlookBar = 1

Const $olFolderList = 2

Const $olPreview = 3

Const $olNavigationPane = 4

;OlRecurrenceState

Const $olApptNotRecurring = 0

Const $olApptMaster = 1

Const $olApptOccurrence = 2

Const $olApptException = 3

;OlRecurrenceType

Const $olRecursDaily = 0

Const $olRecursWeekly = 1

Const $olRecursMonthly = 2

Const $olRecursMonthNth = 3

Const $olRecursYearly = 5

Const $olRecursYearNth = 6

;OlRemoteStatus

Const $olRemoteStatusNone = 0

Const $olUnMarked = 1

Const $olMarkedForDownload = 2

Const $olMarkedForCopy = 3

Const $olMarkedForDelete = 4

;OlResponseStatus

Const $olResponseNone = 0

Const $olResponseOrganized = 1

Const $olResponseTentative = 2

Const $olResponseAccepted = 3

Const $olResponseDeclined = 4

Const $olResponseNotResponded = 5

;OlSaveAsType

Const $olTXT = 0

Const $olRTF = 1

Const $olTemplate = 2

Const $olMSG = 3

Const $olDoc = 4

Const $olHTML = 5

Const $olVCard = 6

Const $olVCal = 7

Const $olICal = 8

Const $olMSGUnicode = 9

;OlSensitivity

Const $olNormal = 0

Const $olPersonal = 1

Const $olPrivate = 2

Const $olConfidential = 3

;OlSortOrder

Const $olSortNone = 0

Const $olAscending = 1

Const $olDescending = 2

;OlTaskDelegationState

Const $olTaskNotDelegated = 0

Const $olTaskDelegationUnknown = 1

Const $olTaskDelegationAccepted = 2

Const $olTaskDelegationDeclined = 3

;OlTaskOwnership

Const $olNewTask = 0

Const $olDelegatedTask = 1

Const $olOwnTask = 2

;OlTaskRecipientType

Const $olUpdate = 2

Const $olFinalStatus = 3

;OlTaskResponse

Const $olTaskSimple = 0

Const $olTaskAssign = 1

Const $olTaskAccept = 2

Const $olTaskDecline = 3

;OlTaskStatus

Const $olTaskNotStarted = 0

Const $olTaskInProgress = 1

Const $olTaskComplete = 2

Const $olTaskWaiting = 3

Const $olTaskDeferred = 4

;OlTrackingStatus

Const $olTrackingNone = 0

Const $olTrackingDelivered = 1

Const $olTrackingNotDelivered = 2

Const $olTrackingNotRead = 3

Const $olTrackingRecallFailure = 4

Const $olTrackingRecallSuccess = 5

Const $olTrackingRead = 6

Const $olTrackingReplied = 7

;OlUserPropertyType

Const $olOutlookInternal = 0

Const $olText = 1

Const $olNumber = 3

Const $olDateTime = 5

Const $olYesNo = 6

Const $olDuration = 7

Const $olKeywords = 11

Const $olPercent = 12

Const $olCurrency = 14

Const $olFormula = 18

Const $olCombination = 19

;OlWindowState

Const $olMaximized = 0

Const $olMinimized = 1

Const $olNormalWindow = 2

;OlSyncState

Const $olSyncStopped = 0

Const $olSyncStarted = 1

;OlBodyFormat

Const $olFormatUnspecified = 0

Const $olFormatPlain = 1

Const $olFormatHTML = 2

Const $olFormatRichText = 3

;OlDownloadState

Const $olHeaderOnly = 0

Const $olFullItem = 1

;OlOfficeDocItemsType

Const $olExcelWorkSheetItem = 8

Const $olWordDocumentItem = 9

Const $olPowerPointShowItem = 10

;OlViewSaveOption

Const $olViewSaveOptionThisFolderEveryone = 0

Const $olViewSaveOptionThisFolderOnlyMe = 1

Const $olViewSaveOptionAllFoldersOfType = 2

;OlViewType

Const $olTableView = 0

Const $olCardView = 1

Const $olCalendarView = 2

Const $olIconView = 3

Const $olTimelineView = 4

;OlFlagIcon

Const $olNoFlagIcon = 0

Const $olPurpleFlagIcon = 1

Const $olOrangeFlagIcon = 2

Const $olGreenFlagIcon = 3

Const $olYellowFlagIcon = 4

Const $olBlueFlagIcon = 5

Const $olRedFlagIcon = 6

;OlExchangeConnectionMode

Const $olNoExchange = 0

Const $olOffline = 100

Const $olCachedOffline = 200

Const $olDisconnected = 300

Const $olCachedDisconnected = 400

Const $olCachedConnectedHeaders = 500

Const $olCachedConnectedDrizzle = 600

Const $olCachedConnectedFull = 700

Const $olOnline = 800

;OlShowItemCount

Const $olNoItemCount = 0

Const $olShowUnreadItemCount = 1

Const $olShowTotalItemCount = 2

;OlStoreType

Const $olStoreDefault = 1

Const $olStoreUnicode = 2

Const $olStoreANSI = 3

;OlPermission

Const $olUnrestricted = 0

Const $olDoNotForward = 1

Const $olPermissionTemplate = 2

;OlPermissionService

Const $olUnknown = 0

Const $olWindows = 1

Const $olPassport = 2

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

  • 1 year later...

omg i love u so much!!! TYYY

I've been trying to figure out the Outlook Com file on my own...using ExcelCom.au3 and IE.au3 and comparing them to the COM objects from the MSDN site. I've learned a lot about COM, but couldn't figure out how to use it with outlook. There's not much I could find. This helps soooo much.

Just so I know because I'll go crazy if I don't ask, are all of the types for say createItem(), are they all numerical? or is the number given in the cons definition just the order in which they're listed? How does it work? I'm sorry I'm so noob, but it's my first time working with COM ever, and it's been pretty nerve wracking...

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...