Outlook VBA help has the tools to get you started. You'll want to look
under the following subjects for actual code examples...
MicroSoft Outlook Visual Basic Reference
Microsfot Outlook Object Model
Objects
M
*MailItem Object*
T
*TaskItem Object*
Events
N
*NEW MAIL EVENT*
The NEW MAIL EVENT fires when new mail is received in the mailbox.
To create a new TaskItem you would use the CreateItem method as in
Set myOlApp = CreateObject("Outlook.Application")
Set myItem = myOlApp.CreateItem(olTaskItem)
You would execute that code in the NEW MAIL EVENT to create the new Task
Item. Once the TaskItem is created, then its just a matter of setting
its properties to the those of the MailItem received in order to 'copy'
the information over. You can also set assorted properties like
importance, categories and/or assign a due date. I'll need to snoop
around for code that identifies the actual new mail item received, but
that should get you started.
FYI - The code would exist in the ThisOutlook module, as such you'd have
to copy the code to each machine on which it should run.
Steven Briggs wrote:
> I pulled the sample code and opened up the VB editor in Outlook 2003.
> Alt+F11. I have tried creating it as a module and as a class. I then create
> a rule and the script is available. Nothing seems to work.
>
> The code looks simple enough but I am inexperienced with adding it to
> outlook. Do you have other resources for how I am supposed to set it up in
> the VB editor or am I going at it the wrong way?
>
> Thanks again.
> Steve
>
> "Sue Mosher [MVP-Outlook]" wrote:
>
>
>>See http://www.outlookcode.com/codedetail.aspx?id=959 for sample code.
>>
>>--
>>Sue Mosher, Outlook MVP
>> Author of Configuring Microsoft Outlook 2003
>> http://www.turtleflock.com/olconfig/index.htm
>> and Microsoft Outlook Programming - Jumpstart for
>> Administrators, Power Users, and Developers
>> http://www.outlookcode.com/jumpstart.aspx
>>
>>
>>"Steven Briggs" <Steven (E-Mail Removed)> wrote in message news:4E29E9B4-BDF8-4B17-8BDC-(E-Mail Removed)...
>>
>>>Is there a way to write a macro that will automatically create a taks from an
>>>inbound e-mail. I am running a small help desk with an e-mail account for
>>>the help desk. I want to create a taks for every incoming e-mail.
>>>
>>>Thanks,
>>>Steve
>>