Outlook 2016 wordeditor

Not open for further replies.

Roland Askew

Outlook version
Outlook 2021 64 bit
Email Account
I am trying to use the word editor within a task object. It allows me to use it to add text but when I try to use the selection move command it does nothing.

Does anyone know if the word editor works in the body of a task object now. If so can you point me in the directions of where the move commands maybe listed.

Thanks very much for your help with this.
Thank you Diane for your help I have managed to get it to work once I had the confident that it would. Do you know of any good help with using the editor that I could read up on.
Thanks again for all your help.
I have got three other scripts to work just having some problems with this one. I am trying to create an email from a task and taking some of the details from the task. I would also like to create hyperlink within the email for the receiving person to be able to open the task. We share the same tasks. This is what I have so far which works and creates the email with the hyperlink which also works but it throws an run time error of 438 this Object does not support this property or method. It highlights the Hyperlink row as being the problem.

In addition to this can anyone help with getting the newly created email as being the active object other than displaying it.

This is the code I have so far. Any help would be very much appreciated.

Sub TaskEmailUpdate()
Dim objOL As Outlook.Application
Dim objTask As TaskItem
Dim objMail As MailItem
Dim objNS As Outlook.NameSpace
Dim objDoc As Word.Document
Dim objSel As Word.Selection
Dim strStatus, strHyperLink, strText, strRow As String

Set objOL = Application
Set objTask = objOL.ActiveExplorer.Selection.Item(1)

If objTask.Class <> olTask Then
MsgBox "You have to have a task selected to run this macro"
Exit Sub
End If

If objTask.Complete = "True" Then
strStatus = "Task Completed on - " & objTask.DateCompleted
strStatus = "Task Status Update - " & Date
End If

strHyperLink = "Outlook:" & objTask.EntryID

Set objMail = Application.CreateItem(olMailItem)
Set objOL = Application
Set objDoc = objOL.ActiveInspector.WordEditor
Set objNS = objOL.Session
Set objSel = objDoc.Windows(1).Selection

objSel.Collapse wdCollapseStart
objSel.Move wdStory, -1
objSel.InsertBefore objDoc.Hyperlinks.Add(objSel.Range, strHyperLink, "", "", "Direct Link to Task", "")

With objMail
.To = "*****@****.com"
.Subject = strStatus & " - " & objTask.Subject
End With

Set objMail = Nothing
Set objTask = Nothing
Set objOL = Nothing
Set objDoc = Nothing
Set objNS = Nothing
Set objSel = Nothing
End Sub
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
M Outlook 2016 still feature updating Using Outlook 0
farrissf Outlook 2016 Optimizing Email Searches in Outlook 2016: Seeking Insights on Quick Search vs Advanced Search Features Using Outlook 0
S Outlook 2016 and Acrobat PDFMaker Office COM Addin Using Outlook 0
W Outlook 2016 MSI - Possible to make work with O365 modern Auth & Win7? Using Outlook 4
J Outlook 2016 Trying to get Outlook 2016 to work with Office 365 Using Outlook 0
W Transfer Outlook 2016 autocomplete file to Outlook 2007 Using Outlook 1
J Outlook 2016 Can't display some embedded HTML images in Outlook 2016 Using Outlook 2
J Outlook 365 Outlook 2016/365 Contacts Lose Info when Favorited to the To-Do Bar Using Outlook 2
O Moving "tasks" to inbox in Outlook 2016 Using Outlook 1
Z Remove GMAIL IMAP account from Outlook 2016 Using Outlook 2
P Prevent Outlook 2016 from using DASL filter Using Outlook 4
bhamberg Shortcuts in Folder Pane (Outlook 2016) Using Outlook 19
G Outlook 2016: Want IMAP Data Files on My D: Drive and Not C: Drive Using Outlook 1
D Outlook 2016 64bit, Cannot Save in 'HTML', format Using Outlook 1
P Color Code or highlight folders in Outlook 2016 Using Outlook 2
B Outlook 2016 Unable to view images or logos on the outlook 2016 emails the same html code works well when i use outlook 2010 Using Outlook 0
B vBA for exporting excel file from outlook 2016 Outlook VBA and Custom Forms 3
M Issue transferring Outlook 2016 email accounts & settings onto new computer Using Outlook 8
glnz Can Word Normal.dotm interfere with Outlook? Office 2016 Using Outlook 5
D Outlook 2016 and Earlier with Office365 in 2021 Using Outlook 3
B Outlook 2016 Retail C2R keeps logging since update? Using Outlook 0
V Outlook 2016 Does Outlook-2016 (64 bit) work with iCloud for Windows ? Using Outlook 5
R Microsoft Outlook 2016 - Gmail not sending, asks for password for SMTP, tried different ports Using Outlook 23
V Outlook 2016 Outlook-2016 and iCloud for Windows - Problems Using Outlook 11
U Outlook 2016 Outlook 2016 sender name Using Outlook 1
S Outlook (2016 32bit; Gmail IMAP) - Save sent message to Outllook Folder Outlook VBA and Custom Forms 0
A Backup Email Accounts On OutLook For Mac 2016 (Microsoft 365 subscription version) Using Outlook 0
M Office 2016 Outlook is forgetting passwords Using Outlook 15
E Can one still buy Outlook (or Office) 2016? Using Outlook 6
I Error saving screenshots in a custom form in outlook 2016, outlook 365 - ok in outlook 2013, outlook 2010 Outlook VBA and Custom Forms 5
R seperate read layout to design in outlook 2016..Help!! Outlook VBA and Custom Forms 3
GregS Why is Outlook 2016 mail in Outlook.com? Using Outlook 1
G Recurring tasks break links Outlook 2016 Using Outlook 5
A How to get body of all emails in outlook 2016 to view in blue color Using Outlook 1
J Edit auto-complete list in Outlook 2016+/365? Using Outlook 0
D iCloud Add-in not working in Outlook 2013 and Outlook 2016 After Windows Upgrade & iCloud Upgrade Using Outlook 2
GregS Outlook 2016 iPhone won't download Outlook 2016 Mail. Using Outlook 0
E How to display "Change Folder" in Change Default Email Delivery Location in Exchange Outlook 2016 Using Outlook 1
A How to open a specific link automatically with outlook 2016 Outlook VBA and Custom Forms 6
V Outlook 2016 will not move emails in search results Using Outlook 4
K Using Outlook 2016 to draw Using Outlook 1
M Outlook 2016 Free/Busy settings ignored Using Outlook 0
K Outlook 2016 - controlling IMAP OST size with Group Policy not working Using Outlook 1
C Outlook 2016/2019 hangs after being open for an extended period Using Outlook 4
GregS 2016 Contact List being managed by Outlook.com? Using Outlook 1
A Outlook 2016 in Cached Mode Using Outlook 1
G Outlook 2016 sync contacts directly between phone and computer using outlook 2016 Using Outlook 0
N Outlook 2016 Folder Icons Look Using Outlook 0
Marc2019 Outlook 2016 Font Problem Using Outlook 5
B Outlook 2016 Does not Shutdown Correctly Using Outlook 3

Similar threads