Create a journal entry for Word documents in Outlook 2013

Last reviewed on April 2, 2013

This series of Word macros will create a new Journal entry in Outlook 2013 when you create a new Word document or open an existing Word document. It also reminds you to close the Journal item when you are done editing. A similar macro can be used with Excel.

To use, paste the code into Word's VB Editor and set a reference to the Outlook object model in Tools > References.

Set a reference to Outlook in Word's VB Editor

Sub autonew()

 Dim ol As New Outlook.Application
 Dim oJournal As JournalItem
 Dim fName As String
 
    fName = InputBox("Enter a Filename", "Subject")
    ActiveDocument.SaveAs fName
 
 Set oJournal = ol.CreateItem(olJournalItem)

 With oJournal
    .Subject = fName
    .Categories = "new doc"
    .Type = "Microsoft Word"
    .StartTimer
    .Save
    .Display
 End With
 
 Set ol = Nothing
 Exit Sub
UserCancelled:
 Set ol = Nothing
 End Sub


Sub autoopen()

 Dim ol As New Outlook.Application
 Dim oJournal As JournalItem
 Dim fName As String
 
 fName = ActiveDocument.Name
 
 Set oJournal = ol.CreateItem(olJournalItem)

 With oJournal
    .Subject = fName
    .Categories = "open doc"
    .Type = "Microsoft Word"
    .StartTimer
    .Save
    .Display
 End With
 
 Set ol = Nothing
 Exit Sub
UserCancelled:
 Set ol = Nothing
 End Sub

Sub autoclose()
MsgBox "Don't forget to close the journal!"
End Sub

Written by

Diane Poremsky
A Microsoft Outlook Most Valuable Professional (MVP) since 1999, Diane is the author of several books, including Outlook 2013 Absolute Beginners Book. She also created video training CDs and online training classes for Microsoft Outlook. You can find her helping people online in Outlook Forums as well as in the Microsoft Answers and TechNet forums.

Please post long or more complicated questions at Outlookforums.

Leave a Reply

If the Post Coment button disappears, press your Tab key.