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
 
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
 
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.
 
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.
 
I'm pretty sure its a TNEF issue. 9I only close threads when spammers keep posting to them.)
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
D Outlook 2016 Creating an outlook Macro to select and approve Outlook VBA and Custom Forms 0
T Outlook creating unwanted tasks in Tasks and Todo from emails Using Outlook 1
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
J Creating Tasks in Outlook 2007 with VBA Outlook VBA and Custom Forms 1
U Creating or modifying Outlook .Nk2 file in C# Outlook VBA and Custom Forms 1
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
G Creating Macro to scrape emails from calendar invite body Outlook VBA and Custom Forms 6
S Custom Contact card - need help creating one Outlook VBA and Custom Forms 1
N Help creating a VBA macro with conditional formatting to change the font color of all external emails to red Outlook VBA and Custom Forms 5
G Event when creating task from mailitem Outlook VBA and Custom Forms 2
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
A Creating Progress Bar or Status Bar Update Outlook VBA and Custom Forms 0
A Are categories still recommended for creating local distribution lists? Using Outlook 3
S Creating Email - Selecting Pre-Defined Text Using Outlook 2
N Creating New Profile Using Outlook 0
Y Creating custom appointment request form with multiple mail recipients Outlook VBA and Custom Forms 5
M creating email from contact file = 3 emails in To field Using Outlook 3
P Recover / Extract Rules from standalone PST file creating RWZ file Using Outlook 2
I Creating meeting invite with disabled tentative button Outlook VBA and Custom Forms 5

Similar threads

Back
Top