Create Outlook "Task" using ilogic

mcgyvr
Consultant
Consultant

Create Outlook "Task" using ilogic

mcgyvr
Consultant
Consultant

Can one create an Outlook task using ilogic?

I can get an email working but not a task so far..

This seems to just create an email not a task..

oOApp = CreateObject("Outlook.Application")
oOTask = oOApp.CreateItem(olTaskItem)
oOTask.Subject = "Check Drawings" 
oOTask.Display 


-------------------------------------------------------------------------------------------
Inventor 2023 - Dell Precision 5570

Did you find this reply helpful ? If so please use the Accept Solution button below.
Maybe buy me a beer through Venmo @mcgyvr1269
0 Likes
Reply
Accepted solutions (1)
458 Views
2 Replies
Replies (2)

bradeneuropeArthur
Mentor
Mentor
With CreateObject("Outlook.Application").CreateItem(3)
    '.Subject = UserForm1.TextBox1.Value & " " & UserForm1.ComboBox1.Value
    '.StartDate = UserForm1.MonthView1.Value
    '.DueDate = UserForm1.MonthView1.Value
    '.ReminderTime = UserForm1.MonthView1.Value - 1
    '.Body = UserForm1.TextBox1.Value & " " & UserForm1.ComboBox1.Value
    .Save
End With

Regards,

Arthur Knoors

Autodesk Affiliations:

Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:Drawing List!|Toggle Drawing Sheet!|Workplane Resize!|Drawing View Locker!|Multi Sheet to Mono Sheet!|Drawing Weld Symbols!|Drawing View Label Align!|Open From Balloon!|Model State Lock!
Posts and Ideas:Dimension Component!|Partlist Export!|Derive I-properties!|Vault Prompts Via API!|Vault Handbook/Manual!|Drawing Toggle Sheets!|Vault Defer Update!


! For administrative reasons, please mark a "Solution as solved" when the issue is solved !

tfrohe_LSI
Advocate
Advocate
Accepted solution

I find it easiest to manually create and save a template for your tasks in Outlook. Then use the following code to create your task programmatically. 

 

oOApp = CreateObject("Outlook.Application")
oOTask = oOApp.CreateItemFromTemplate("C:\Users\<USERNAME>\AppData\Roaming\Microsoft\Templates\My Task.oft")
oOTask.Subject = "Check Drawings" 
oOTask.Display

 

This will work as expected every time.