Recording Macros in Outlook

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I know this should be simple but i can't get Outlook to record a new macro.
It's pretty simple i just want a macro that will open a new journal entry
change the reference to task instead of default phonecall and star the
timer...any suggestions, please let me know.
 
Outlook has no macro recorder. You must program Outlook objects directly (see http://www.outlookcode.com/d/vba.htm).

For your scenario, though, you actually need not a macro but a custom form that has the journal entry type set to task. Do this by creating a new journal item and changing the type from Phone Call to task. Next, choose Tools | Forms | Design This Form, then Form | View Code and paste the code below into the window:

Function Item_Open()
If Item.Size = 0 Then ' it's a new entry
Item.Type = "Task"
Item.Start = Now
Item.StartTimer
End If
End Function

Choose Tools | Forms | Publish Form and publish the form to the Journal folder, giving it the display and form name Task, which will result in the Message Class of IPM.Activity.Task. You will then be able to launch this form from the menu in the Journal folder by choosing Actions | New Task. See http://www.outlookcode.com/d/launchform.htm if you also want to write a macro to run from a toolbar button when you are not looking at the Journal folder.

FYI, there is a newsgroup specifically for general Outlook programming issues "down the hall" at microsoft.public.outlook.program_vba or, via web interface, at http://www.microsoft.com/office/community/en-us/default.mspx?dg=microsoft.public.outlook.program_vba
 
Hi again, Sue!

I am a non-programmer. I need to perform this about three hundred times, so
am hoping that there is a packaged bit of code somewhere that will do at
least part of it.

open an e-mail
open a link in the e-mail
select all
copy
paste into Notepad or Word
save as

Do you have any resources or ideas?

Many thanks for all your help over the months!
 
Sue's on vacation.

I'm not aware of any canned software that does exactly what you want, as far
as I know that's a task for custom code. There are code samples at
outlookcode.com that cover putting things into Word, I also have a sample
for that at my code samples page at www.slovaktech.com but nothing that
matches exactly what you want. It's something that would have to be pieced
together from existing samples.
 
Thanks, Ken!

Ken Slovak - said:
Sue's on vacation.

I'm not aware of any canned software that does exactly what you want, as far
as I know that's a task for custom code. There are code samples at
outlookcode.com that cover putting things into Word, I also have a sample
for that at my code samples page at www.slovaktech.com but nothing that
matches exactly what you want. It's something that would have to be pieced
together from existing samples.
 
I really want to record a macro that does the following when I send/receive:

open rules/alerts
run rules now
select all rules
run them

This deletes all the junk and moves certain emails into certain folders. I
am sick of running these every time.

Please help as I am no techie.

Also why does Outlook not record macros?

Thanks
 
Most Office programs have no macro recorder. Word and Excel are two of the few that do.

Outlook 2007 is the first version to allow you to run rules programmatically. If you upgrade at some point in the future, you can take a look at the code sample at http://www.outlookcode.com/codedetail.aspx?id=1266.

For Outlook VBA basics, see http://www.outlookcode.com/d/vbabasics.htm

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
Back
Top