Creating a Outlook task in Excel

Status
Not open for further replies.

Wotme

Member
Outlook version
Outlook 2019 32-bit
Email Account
POP3
Hi, and thanks for looking

I have been using a code in Excel to create a task in Outlook. On my PC it works perfectly. The spreadsheet is for others to use on different PCs and laptops. When they use the spreadsheet instead of creating a task it sends an email, with the information, i.e. start time start date etc in the body of the email.

I have got round the problem by using a code in Outlook which creates a task from their email, but of course I would rather have the task sent to me as I intended.

I cannot understand why, if the code works on my PC and other users are using Outlook and Excel why is the code creating an email.

Any ideas/suggestions would be greatly appreciated
 

Wotme

Member
Outlook version
Outlook 2019 32-bit
Email Account
POP3
It should work the same on all computers. Can you post the code? At least the code that creates the task.
Thank you, hope you can help. By the way I've just noticed I have some unnecessary code, but Ive left in.

Code:
Private Sub CreateTasks()
    Dim go As String
    Dim mailto As String
    mailto = Range("emailto")
   ' MsgBox mailto
   Message = "Do you want to create a task"
   go = MsgBox(Message, vbYesNo, "File submission ") 
 
If go = vbYes Then
 ActiveSheet.Unprotect Password:="xyz" 
 
Range("a1") = 1 
 
Range("h12") = "A task request was sent to xyz on " & Date & " at " & Time 
 
'Variable declaration 
 
detail1 = Range("h15") 
 
detail2 = Range("h16")
   Dim olTask As Object
   'Dim sd As Date
    Dim client As String
   Set olApp = CreateObject("Outlook.Application")
       client = Range("c5")
       sd = Date
       'Range("h20")
       rep = "Report"
           Set olTask = olApp.createitem(3) 'olTaskItem
           With olTask
               .Subject = client & " New File *"
               .Body = Chr(13) & detail1 & Chr(13) & Chr(13) & detail2
                    
               .Status = 0 'olnotstarted
               .Importance = 2 'olImportanceHigh
              .ReminderSet = True
              ' .ReminderTime = Cells(i, "I").Value + TimeValue("09:00:00")
              .startdate = sd
              .categories = rep
             .DueDate = sd + 7
           
               .Recipients.Add ("[EMAIL="task@pennanthills.net"]xyz.net[/EMAIL]") 
 
> assign 
 
> Send 
 
> Save
   End With
  End If
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
Thank you, hope you can help. By the way I've just noticed I have some unnecessary code, but Ive left in.
lol. sounds like me. I'm constantly repurposing macros and leave a lot of useless code in them.

That code is creating an assigned task here. The only thing I needed to do was swap the Save and Send commands, for some reason it errored on send if the task wasn't saved first.

So I'm clear, are people you send the assigned task to getting an email message or are other people using this macro and sending email instead of a task?

The first one (you send task, they get email) can be due to missing TNEF data - aka winmail.dat. The second one makes no sense, as you are creating a task.

If other people use it to assign a task to you or someone else, it could be missing TNEF data. Are you all using POP3? Screenshots of where to check TNEF settings are here - http://www.slipstick.com/problems/outlook-is-sending-winmail-dat-attachments/ - they should be using let outlook decide but may need to change it on the contact.
 

Wotme

Member
Outlook version
Outlook 2019 32-bit
Email Account
POP3
lol. sounds like me. I'm constantly repurposing macros and leave a lot of useless code in them.

That code is creating an assigned task here. The only thing I needed to do was swap the Save and Send commands, for some reason it errored on send if the task wasn't saved first.

So I'm clear, are people you send the assigned task to getting an email message or are other people using this macro and sending email instead of a task?

The first one (you send task, they get email) can be due to missing TNEF data - aka winmail.dat. The second one makes no sense, as you are creating a task.

If other people use it to assign a task to you or someone else, it could be missing TNEF data. Are you all using POP3? Screenshots of where to check TNEF settings are here - http://www.slipstick.com/problems/outlook-is-sending-winmail-dat-attachments/ - they should be using let outlook decide but may need to change it on the contact.
Hi, the people are sending me the task, or at least it should be, but its arriving in my inbox as an email.

I really want the task to be created in their Outlook tasks and assign the task to me. I'm not familiar with TNEF but the link you sent could be the answer. I'm sure they are using Outlook, but maybe not POP3. At last a thread to follow up. If I can leave this topic open I would be very grateful, and I'll get back to you with the outcome.
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
I'm pretty sure its a TNEF issue. 9I only close threads when spammers keep posting to them.)
 

LMS

Senior Member
Outlook version
Outlook 2007
Email Account
Exchange Server
What does that mean please?
 
Status
Not open for further replies.
Thread starter Similar threads Forum Replies Date
M Creating an RSS Feed **FROM** Outlook 2013 Calendar. Using Outlook 5
R Would creating a new profile cause Outlook to download all the old mails from the server? Using Outlook 1
T Outlook creating a folder named: "Unwanted" Using Outlook 3
M Outlook 2007 Contacts Glitch: Creating a new email Using Outlook 1
Liza Creating a rule in outlook to filter messages Using Outlook 0
D Creating an outlook session from Access vba but run silently. With A specific profile Outlook VBA and Custom Forms 1
M Creating Outlook Appointments from Excel Cells Outlook VBA and Custom Forms 1
A Creating an outlook rule to forward an email with a specific message Using Outlook 1
N Creating or changing the main new mail message template in Outlook 2010 Using Outlook 2
J Outlook creating unwanted rule on its own Using Outlook 1
Rupert Dragwater creating gmail account in Outlook 2013 Using Outlook 7
J Creating an "isolated" shared calendar in Outlook Outlook VBA and Custom Forms 1
witzker Outlook bug when creating a user defined contact form? Using Outlook 1
G Creating an Outlook Rule using Internet Header time Using Outlook 1
G Questions on creating Outlook forms Using Outlook 0
K Outlook 2010 creating extremely large PST files for IMAP accounts Using Outlook 3
J Troubleshooting Creating New Outlook Account Using Outlook 1
P HTA creating Outlook MeetingItem - need formatted body text Using Outlook 4
A Creating a sign up form in Outlook 2010 Using Outlook 1
N Creating dynamic forms in outlook?? Using Outlook 2
F Creating Macro in Outlook 2003 Using Outlook 8
M Outlook 2010 and how to get attachments listed when creating a new email? Using Outlook 1
V Creating Distributions in Outlook Connector Using Outlook.com accounts in Outlook 1
S Outlook 2010 Ribbon - Creating Links To Websites or EXE Files Using Outlook 4
O Macro for creating hyperlinks in Outlook 2007 Using Outlook 3
B Creating an Offline Database with Outlook 2007 BCM Using Outlook 1
S Outlook 2007 SP2: When creating a future appoinment it shows day it was created not the future date Using Outlook 1
A Creating personal folders on outlook 2010 and setting properties. Using Outlook 3
J Creating a unique Inbox for a POP3 account within Outlook 2007 Using Outlook 3
S Outlook 2007 will not show files under the folders any longer when creating a hyperlink. No error messages Using Outlook 1
S outlook profile keeps corrupting even after creating new profile Using Outlook 11
B Outlook won't start after creating Exchange account Using Outlook 7
H warnings from outlook when creating schedule conflicts Using Outlook 2
K Outlook defaults to personal folder when creating new email account Using Outlook 4
Q Creating Mail Folders on Left side of Microsoft Office Outlook 2007 Using Outlook 1
S When creating various form emails, have Outlook fill in specific phrases/paragraphs based on a couple of words. Using Outlook 1
G How do you view the ruler in an e-mail you are creating (Outlook 2010)? Manually set tabs, etc. Using Outlook 4
J Creating Tasks in Outlook 2007 with VBA Outlook VBA and Custom Forms 1
E Outlook 2010 crashes when creating (reply) a message from a Meeting Using Outlook 6
U Creating or modifying Outlook .Nk2 file in C# Outlook VBA and Custom Forms 1
J Incorrect tracking information received from room mailbox when creating a meeting request with Outlook 2007 SP 2 in cached mode Using Outlook 3
C Creating an Outlook Profile for RPC over HTTP client Outlook VBA and Custom Forms 1
I Creating an Outlook 2007 macro that attaches a signature to new me Outlook VBA and Custom Forms 1
J Creating form in Outlook 2007 Outlook VBA and Custom Forms 1
Fozzie Bear Outlook 2016 Creating a shared local Contacts folder Using Outlook 2
R Creating a user defined function Outlook VBA and Custom Forms 3
O How to prevent CC from showing when creating a new mail? Using Outlook 1
N Creating a button or link to a form in the Organizational Forms Library Outlook VBA and Custom Forms 3
B Creating an email with the list of tasks Outlook VBA and Custom Forms 0
L Creating drafts when I thought I was sending Using Outlook 1
Similar threads


















































Top