Date Picker in email

Status
Not open for further replies.

PegR

New Member
Outlook version
Outlook 2013 32 bit
Email Account
IMAP
I send out work schedules to staff through email. Is there any way to use a "date picker" (such as in Word or Excel) in the body of the email to minimize errors with the day and date? For example, if I type 3/11/16, want it to change the format to Thursday, March 11, 2016. I use Outlook 2010 or 2013. We do not use an Exchange server; all of the recipients will use personal emails (not our company email) and use a variety of email clients. Is there an addin that would help me? I don't know how to use VBA coding very well, but am willing to try. Any suggestions would be appreciated.
 

PegR

New Member
Outlook version
Outlook 2013 32 bit
Email Account
IMAP
Diane,
Thanks for your quick response. I seldom use today's date, they are always dates in the future. So, it sounds like a macro for me...I will keep searching. I would appreciate if you do find one you could direct me to it and a way I can teach myself how to use it.
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
Some things are more fun than work... :)

This works in an open message - you need to select the date in the message and run the macro (its not fully automated). 3/10/16 works as does 3/10 or the full short date 3/10/2016. the format can be tweaked as needed. Examples:
objSel = Format(myDate, "dddd, mmmm d, yyyy") returns Monday, April 11, 2016
objSel = Format(myDate, "ddd, mmm-d-yyyy ") returns Mon, Jul-11-2016 and adds a space at the end

It might be easier to use an inputbox - much like the insert date dialog, you'd trigger the macro and enter a date in an dialogbox instead of typing it then selecting it and running the macro.

basics of using a macro are here - How to use Outlook's VBA Editor I'll write this macro up as an article because it's kind of cool. :) Won't be before the weekend though, because I'm supposed ot be doing something else right now. :(

Code:
Sub CopyPasteDate()
On Error Resume Next
     
Dim objItem As Object
Dim objInsp As Outlook.Inspector
Dim objWord As Word.Application
Dim objDoc As Word.Document
Dim objSel As Word.Selection
Dim myDate As Date
Dim DataObj As MSForms.DataObject
Set DataObj = New MSForms.DataObject

Set objItem = Application.ActiveInspector.CurrentItem
Set objInsp = objItem.GetInspector
Set objDoc = objInsp.WordEditor
Set objWord = objDoc.Application
Set objSel = objWord.Selection
    
     objSel.Copy
DataObj.GetFromClipboard
myDate = DataObj.GetText(1)
objSel = Format(myDate, "dddd, mmmm d, yyyy")
Set objItem = Nothing
Set objInsp = Nothing
Set objDoc = Nothing
Set objWord = Nothing
Set objSel = Nothing
End Sub
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
Oh, and you need to set a reference to both word and msforms

This has a screenshot of the references dialog - Use Word Macro to Apply Formatting to Email
For forms, add C:\Windows\System32\FM20.dll as a reference. (click browse in the reference dialog then paste the path in the field)
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
C Insert a Date Picker for Send Mail Subject Using Outlook 1
C Insert date in Subject through date picker Using Outlook 0
S Combination Field (Date Format) Outlook VBA and Custom Forms 0
U How can the Received date be edited? Using Outlook 0
D This folder up to date vs all folders up to date Using Outlook 1
S Outlook Macro for [Date][Subject] Using Outlook 1
N Save emails within a certain date range to network drive Outlook VBA and Custom Forms 0
kburrows Reset Date to Keep Tasks from Archiving Using Outlook 9
M Extract "Date sent" from emails (saved to folder using drag and drop) Outlook VBA and Custom Forms 1
DDB VBA to Auto Insert Date and Time in the signature Outlook VBA and Custom Forms 2
P Short Date Format when typing in a task Using Outlook 2
S Change "This Week" flag start date behavior Using Outlook 1
S Archiving and Likely Modified Date Problem Using Outlook 3
A VBA Script - Print Date between first email in Category X and last email in Category Y Outlook VBA and Custom Forms 3
S Outlook 2016 Arrange tasks by date, additional custom sorting, but still use friendly terms like Today, Tomorrow, This week? Using Outlook 1
L Macro to add Date & Time etc to "drag to save" e-mails Outlook VBA and Custom Forms 17
S save attachment with date & time mentioned inside the file Outlook VBA and Custom Forms 0
witzker Pls help to change the code for inserting date in Ol contact body Outlook VBA and Custom Forms 5
C Outlook with Office365 - search across account, by date rate, in multiple folders - how? Using Outlook 2
M Sorting by Day in Date Column Advanced Filter BCM (Business Contact Manager) 1
V Date and/or time error in Outlook Form Outlook VBA and Custom Forms 0
S Body text of Email from invite date/time Outlook VBA and Custom Forms 7
V 10 Years calenders -single date together Exchange Server Administration 8
O Export Outlook calendar appointments by filters and date range Outlook VBA and Custom Forms 1
D Add date next to day name in Outlook Today calendar view Using Outlook 1
X If you change expiration date of repeated task it dupplicates Using Outlook 1
D Archive by receive date not working Using Outlook 2
V Making a Date field mandatory in outlook form Outlook VBA and Custom Forms 2
P Auto Insert Current Date or Time into Email Subject Outlook VBA and Custom Forms 2
L Ctrl Alt d date stamp use Using Outlook 1
A Create date folder and move messages daily Outlook VBA and Custom Forms 1
witzker Outlook 2010 Insert Date & Time at the button of an OL contactform in red Using Outlook 2
O Tasks - Is there a postponed date column? Using Outlook 7
J Command Button to stamp a date and time in a textbox in Outlook 2016 Outlook VBA and Custom Forms 3
K Outlook Archive to PST Files by Date Range VBA Script? Outlook VBA and Custom Forms 1
W Save and rename outlook email attachments to include domain name & date received Outlook VBA and Custom Forms 4
F Finding Meetings/Tasks in a date range Using Outlook 1
W Save Outlook attachment in network folder and rename to current date and time Outlook VBA and Custom Forms 18
M Macro to add date/time stamp to subject Outlook VBA and Custom Forms 4
V Changing default date for task follow-up buttons Using Outlook 2
J Old unread emails on current date (MDaemon Server) Using Outlook 1
D Outlook macro with today's date in subject and paste clipboard in body Outlook VBA and Custom Forms 1
C Need VBA code to automatically save message outside outlook and add date Outlook VBA and Custom Forms 1
B Search by date macro Outlook VBA and Custom Forms 0
S set a flag task date as the next weekday Outlook VBA and Custom Forms 4
K Daily task list > show tasks on the exact due date and not on the "current date" Using Outlook 1
S Outlook User defined date field (UDF) not syncing Using Outlook 2
I Email Replied for first time Date/Time Outlook VBA and Custom Forms 2
E Outlook 2010 disable date auto-complete Using Outlook 2
Diane Poremsky Display the Created Date field of any Outlook item Using Outlook 0

Similar threads

Top