Inserting Dates With Quick Parts (or Macros)

Status
Not open for further replies.

srmsrm

Senior Member
Outlook version
Outlook 2016 64 bit
Email Account
IMAP
I'm using O2010. In my notes (tasks and contacts), I use Quick Parts to enter repetitive text.

What I currently do is either type in the date or use insert date and then use the quick parts. Based on where I enter the text, the format of the date may change.

I also don't want the date to change in my notes, so I am not using the update automatically option in Data and Time.

What I would like to do is be able to use quick parts and have it insert today's current date in the format I require (and font attributes) and the text. So for example, when I select "Test" from Quick Part, it enters:

<today's date in required format> - <text
Its not a big deal to select insert the date each time, however, it would be nice to reduce once more click and have QP do it all for me.

If its not possible, it there a simple macro to insert today's current date in the format I require (and font attributes) and the text into the Task and Contact notes (using the above example)? Maybe I can use macros to insert the data and text instead of quick parts.

Thank you.

Shawn
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
The date is doable but the formatting is going to be more difficult. Autocorrect can do the formatting but needs to use the insert date with updating command.




See http://www.slipstick.com/outlook/insertdate.asp for a simple sample with a custom button on a form. This won't work as a QAT button - i haven't had a chance to check formatting codes with it.
 

srmsrm

Senior Member
Outlook version
Outlook 2016 64 bit
Email Account
IMAP
Donna - I got the date and text to work in the format required, but not using and attributes or color. Thank you.

Are you saying with Macros I cannot use the formatting (e.g. bold, color, etc.).

In Outlook 2003, I had used Redemption using RTF. Can I use Redemption in Outlook 2010?

Shawn
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
You can set the formatting but its more complicated to do and you need the formatting code. AFAIK, its RTF, not HTML.




This is RTF code from an RTF file -it might be shorter and cleaner for email.




{\rtlch\fcs1 \af37 \ltrch\fcs0 \cf1\insrsid12061625 Testing RTF


\par }\pard \ltrpar\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid12061625


\par }{\rtlch\fcs1 \af0\afs24 \ltrch\fcs0 \b\fs24\cf6\insrsid2756157\charrsid8025584 September 6 2011}{\rtlch\fcs1 \af0\afs24 \ltrch\fcs0 \b\fs24\cf6\insrsid2756157 \endash }{\rtlch\fcs1 \af0\afs24 \ltrch\fcs0 \fs24\insrsid2756157\charrsid8025584 Note:}{


\rtlch\fcs1 \af0\afs24 \ltrch\fcs0 \b\fs24\cf6\insrsid2756157\charrsid8025584
 

srmsrm

Senior Member
Outlook version
Outlook 2016 64 bit
Email Account
IMAP
Diane:

Thank you for your help.

I think what you noted is beyond my capabilities. I understand enough to get by and these forums and people who help like you have been great. I think I should just pick up a book and read it or just take a class. :)

I did have one other question. I got the work so when I run the macro the date appears as:
<cursor is here> 09/07/11 -

I can then use the Quick Parts to add the text.

My question is the cursor always jumps back to the beginning of the date. I saw code on cursor position, but was hoping there was an easy command to keep the cursor position after the date. For example:

09/07/11 - <cursor is here
Below is the code I'm using:

Sub ContactDate1()
Dim objItem As Object
Dim objNS As NameSpace

Set objNS = Application.GetNamespace("MAPI")
Set objItem = Application.ActiveInspector.CurrentItem
If objItem.Class = olContact Then
objItem.Body = objItem.Body & Format(Now(), "mm/dd/yy") & "
End If

Set objItem = Nothing
Set objNS = Nothing

End Sub

Shawn
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
witzker Pls help to change the code for inserting date in Ol contact body Outlook VBA and Custom Forms 5
D Inserting sender name and address with vba Outlook VBA and Custom Forms 1
W Inserting Additional Email Address Outlook VBA and Custom Forms 4
G Message template / custom forms and VBA Help needed - inserting info into table Outlook VBA and Custom Forms 3
D Using Libraries when inserting a file in Outlook 2013 Using Outlook 1
L Inserting a PPT/PDF into the message body Using Outlook 1
B Outlook 2007 - Slow opening folders when inserting attachments Using Outlook 2
L Block others from inserting appointments in your calendar Using Outlook 3
W inserting activeX/user control into form Outlook VBA and Custom Forms 1
H C# inserting word document with formatting into outlook message Outlook VBA and Custom Forms 1
R Inserting a hyperlink in the bod of an outlook appt. Outlook VBA and Custom Forms 13
K Inserting text from a macro Outlook VBA and Custom Forms 1
P Outlook tasks keeps changing (updating) dates that I type Using Outlook 2
V Why is "Value Required" checkbox greyed out for Dates? Outlook VBA and Custom Forms 2
L dynamic and static dates in Outlook contact "notes" ie. body Using Outlook 2
I Help with dates in task list. Using Outlook 5
Z Outlook for G Suite emails showing wrong dates Using Outlook 4
Z Outlook 2013 Gmail IMPA emails not showing dates only showing times Using Outlook 1
J Outlook 2013 Extract Flag Completed dates to Excel Macro Outlook VBA and Custom Forms 16
O Outlook 2016 follow-up flags--how can I add dates? Using Outlook 1
L Entering dates in Contacts and Calendar Using Outlook 4
O highlighted dates in Yearly View for Outlook 2010 Using Outlook 1
B Extract Dates for Appointment Item in Body of email Outlook VBA and Custom Forms 10
1 Incorrect dates in sent folder Using Outlook 4
C Many Expiration Dates in Custom Form Using Outlook 1
N To Do bar showing incorrect due dates on tasks Using Outlook 4
O automate dates in outlook template Using Outlook 1
R adding anniversary dates in outlook Using Outlook 2
B Birthday dates automatically (and improperly) placed in Birthday Details Using Outlook 2
D Task Start and Due Dates Using Outlook 3
T Conditional dates in Outlook Calendar Exchange Server Administration 1
C Dates changes to 1899 when Tab key hit in Time... Using Outlook 3
C dates missing when importing emails Using Outlook 5
K Recurring Tasks on specific dates, not pattern Using Outlook 0
S Reminders and Due Dates in Outlook 2010 Using Outlook 6
D Sending Multiple Meeting Dates in One Meeting Request Using Outlook 4
A Is there a calender preference for Julian Dates in outlook? Using Outlook 4
T comparing and subtracting sent and received dates Outlook VBA and Custom Forms 3
D offline fatabase on laptop not remembering TASKS dates BCM (Business Contact Manager) 1
J Get Dates of Recurring Events in Shared Appointment Calendar Outlook VBA and Custom Forms 4
V How to add 'Previous Item' and 'Next Item' to the Quick Access Toolbar Using Outlook 1
J Text icon in Quick Access toolbar ? Using Outlook 2
Ken Pascoe Outlook Categories Quick List Using Outlook 0
G How to add a folder shortcut to outlook quick access toolbar? Using Outlook 6
S How to set up button in ribbon for individual Quick Steps Using Outlook 1
CWM030 A quick question for Diane about Exchange Exchange Server Administration 2
V Change default default save location to Quick Access Using Outlook 1
R Quick Access view in File Explorer when saving attachments Using Outlook 0
M font format discrepancies with Quick Parts Using Outlook 1
R Categorize Button in Quick Access Toolbar Disappears on New Email Using Outlook 1

Similar threads

Top