Programming Outlook Journal entries

A

Adam

Hi all,
I have a question about programming a journal entry. I am having trouble
firing the objJournal.StartTimer method. The code works fine when I run it
with MSH, but I cannot get the VBScript version to work.

Here is my MSH code:

$ol = new-object -COM outlook.application
$task = $ol.createitem(4)
$task.subject = "MSH"
$task.type = "Task"
$task.starttimer()
$task.save()

Heres my VBScript version:

Set objOutlook = CreateObject("Outlook.Application")
Set objJournal = objOutlook.CreateItem(4)
objJournal.Subject = "VBS"
objJournal.type = "Task"
objJournal.StartTimer
objJournal.save


Thanks
 
M

Milly Staples [MVP - Outlook]

Try reposting to an Outlook programming group - you are likely to find
faster assistance there.

--
Milly Staples [MVP - Outlook]

Post all replies to the group to keep the discussion intact. All
unsolicited mail sent to my personal account will be deleted without
reading.

After furious head scratching, Adam asked:

| Hi all,
| I have a question about programming a journal entry. I am having
| trouble firing the objJournal.StartTimer method. The code works fine
| when I run it with MSH, but I cannot get the VBScript version to work.
|
| Here is my MSH code:
|
| $ol = new-object -COM outlook.application
| $task = $ol.createitem(4)
| $task.subject = "MSH"
| $task.type = "Task"
| $task.starttimer()
| $task.save()
|
| Heres my VBScript version:
|
| Set objOutlook = CreateObject("Outlook.Application")
| Set objJournal = objOutlook.CreateItem(4)
| objJournal.Subject = "VBS"
| objJournal.type = "Task"
| objJournal.StartTimer
| objJournal.save
|
|
| Thanks
 
A

Adam

Still no answer...but I realized something. The VBScript version works, but
only if you add a objJournal.display call and you leave the entry open the
whole time. For some reason the timer either does not start otherwise or
gets nuked when you click the new entry through Outlook. The MSH version
however, will create the journal entry and start the timer without having to
display the entry, and when you click into in from Outlook the timer is still
running.
 
Top