Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do assign a task to a public folder task list?

Status
Not open for further replies.

RobMcP

Technical User
Jul 25, 2005
6
GB
Hi There,

In an application I am writing, I would like to have a button control that opens the new task window and sets it to assign to a public folder task list in one action.

I am writing this app with VS2005 Pro, and it will run in an Outlook/Exchange 2003 environment.

Any help would be greatly appreciated.
 
Hi Rob
Im not sure how far you have got with this, but you might want to take a look at

Sweep
...if it works, you know the rest..
curse.gif
 
Thanks for the swift response Sweep, unfortunately I do not have VSTO only Pro. Although I do not believe I need this to achieve what I want. When the button on my app is clicked, I want it to fire up Outlook and create a new task in a public folder. The trouble is I haven't a clue how to achieve this.

I can get it to fire up outlook with the shell command, but thats about as far as I've got.

Thanks again.

Rob

 
google on vb.net outlook automation. You will find lots of sample code examples. There should also be a few threads here if you search. The only trouble with Outlook is that its security detects when you are attempting to send mail or even read the contacts list, and pops up a box asking you to confirm that this is ok. Again there are ways around this, but the choice of direction is one of user preference. You should be able to make a start, but post back if you get stuck along the way


Sweep
...if it works, you know the rest..
curse.gif
 
Hi Again,

Here's what I've got so far :-

Code:
Private Sub HelpToolStripButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles HelpToolStripButton.Click
        Shell("C:\Program Files\Microsoft Office\Office11\Outlook.exe")
        SendKeys.SendWait("^Y")
        SendKeys.SendWait("+{TAB}")
        SendKeys.SendWait("\\Public Folders\All Public Folders\Public Tasks")
        SendKeys.SendWait("{ENTER}")
        SendKeys.SendWait("^+K")
    End Sub

The problem with the code is that it is firing the SendKeys commands before Outlook has finished loading and so nothing happens after Outlook has started.

I've tried using a timer to slow things down does not work consistently. I'm beginning to think VSTO would be handy right now...

Cheers, Rob

 
Sorry..so you're saying you cant add a reference to Outlook, and create an Outlook application object??


Sweep
...if it works, you know the rest..
curse.gif
 
You must reference the outlook object library and use the outlook object.

Even better is it to use ldap(I think) or webdav. if your company is exchange that is, probably otherwise you wouldn't have the public folders silly me.

Christiaan Baes
Belgium

"My new site" - Me
 
wb..Chrissie, glad to see you didnt temporarily leave this forum too. [bigsmile]

Sweep
...if it works, you know the rest..
curse.gif
 
yeah well, I was thinking about it, but this forum would go down the drains without me.

Christiaan Baes
Belgium

"My new site" - Me
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top