PC Review Forums Newsgroups Microsoft Outlook Microsoft Outlook VBA Programming from Word to Outlook task

Reply

from Word to Outlook task

 
Thread Tools Rate Thread
Old 17-02-2004, 11:21 AM   #1
torstein s. johnsen
Guest
 
Posts: n/a
Default from Word to Outlook task


I want to make a reminder to some of my documents in Word. My plan is to
make a "task" (Hope this is the right word, I'm using an Norwegian Outlook
XP) in Microsoft Outlook with the document.

My wish is a menu item in Word where I can chosse "Send to -- Outlook
task".

Is this possible and how?

I hope the explanation is possible to understand, my computer english is not
very good.

Thanks


Torstein S. Johnsen



  Reply With Quote
Old 17-02-2004, 04:17 PM   #2
Ken Slovak - [MVP - Outlook]
Guest
 
Posts: n/a
Default Re: from Word to Outlook task

You can use the Word macro recorder to record a new macro and create a
button that gets whatever information you want from the Word document.
Then the macro would have to be edited to add code similar to the
following (you will need a reference to Outlook set in your Word VBA
project):

Dim oApp As Outlook.Application
Dim oTask As Outlook.TaskItem
Dim oFolder As Outlook.MAPIFolder
Dim oNS As Outlook.NameSpace

Set oApp = CreateObject("Outlook.Application")
Set oNS = oApp.GetNamespace("MAPI")
Set oFolder = oNS.GetDefaultFolder(olFolderTasks)
Set oTask = oFolder.Items.Add
'from here you add information from your document
'the fields you may want to use include Subject, Body, DueDate
With oTask
.Subject = "my document"
.Body = "some text, maybe from Word doc"
.DueDate = DateAdd("d", 1, Date) 'set due for tomorrow
.ReminderSet = True
.ReminderTime = #Feb. 18, 2004 9:00:00 AM#
.Save
End With

Use the Object Browser in the VBA project for the Outlook library to
see what properties are available for use.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginners Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"torstein s. johnsen" <torseip@online.no> wrote in message
news:fPmYb.4664$rj4.65455@news2.e.nsc.no...
> I want to make a reminder to some of my documents in Word. My plan

is to
> make a "task" (Hope this is the right word, I'm using an Norwegian

Outlook
> XP) in Microsoft Outlook with the document.
>
> My wish is a menu item in Word where I can chosse "Send to --

Outlook
> task".
>
> Is this possible and how?
>
> I hope the explanation is possible to understand, my computer

english is not
> very good.
>
> Thanks
>
>
> Torstein S. Johnsen
>
>
>



  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off