Didn't know you were trying to stop a migration to Exchange; I would have been more helpful originally. ;)
See below for more info. --- Joey Kelly <[EMAIL PROTECTED]> wrote: > On Friday 11 February 2005 07:15, John Hebert spake: > > > > Also, there are _many_ other forums out there that > > deal with VBScript, Outlook, etc. > > Is it possible to have a script run in the > background? Or is everything > absolutely tied to the GUI? I can already > point-and-click and export to Excel > format, though making it cleaner or shorter (perhaps > reducing the entire > process to 1 click, for instance) might be helpful. Yes. As Andrew said, using WSH you can do just about anything that can be done via a GUI. > I'd really like to have it happen periodically > without the user having to do > anything. One of the users in question will probably > balk at having to > manually export his data (and he's a high-level > manager, so I'm not going to > be able to make him do it). Not a problem. Again, per Andrew, Task Scheduler is basically cron. > What really gets me is that I've set up WebDAV, > gotten mozilla and perhaps a > couple of other clients to post to the DAV server, > import random calendars, > etc., but Outlook simply won't play nice. I've > gotten Outlook to export > free/busy lists, but those don't give enough > information. Also, importing > free/busy has been hit-and-miss. The users are not > likely to want to migrate > to some other app, and in any case most of them have > PDAs, which complicates > things even further. :) Basically, you need to create a script (VBScript or JScript) that is hosted under WSH (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnanchor/html/scriptinga.asp) on the client machine and run once an hour via the Task Scheduler. The script, let's say VBScript for this example (since I don't really know JScript), needs to create an object reference to Outlook and get its namespace: Set objOL = Script.CreateObject("Outlook.Application") Set olNS = objOL.GetNameSpace("MAPI") Now you can create an object that has a reference to the Calendar: Set olMyCalendar = olNS.GetDefaultFolder(olFolderCalendar) Set olMyCalendarItems = olMyCalendar.Items Where I get lost is how to loop through the list of items in order to print them out or export them. I don't see a Calendar Item object in the Outlook Object Model. Any closet VB programmers out there that can help? To examine the Outlook Object Model, do this in Outlook (from http://www.outlookcode.com/d/tips/gethelp.htm): ----------------------------------------------- To see Help topics on the different Outlook objects and their properties, methods and events, use the Object Browser in Outlook 2000 VBA or, for earlier versions, in Word or Excel VBA (or even in Visual Basic): 1. Press Alt+F11 to open the VBA environment. 2. Press F2 to display the Object Browser. 3. If you're in Word or Excel VBA, choose Tools | References, and add the Microsoft Outlook library to the project. 4. At the top of the Object Browser, switch from viewing <All Libraries> to Outlook. The Object Browser should now show you a list of all the Outlook objects. You can use the box at the top of the Object Browser to search by name or just browse the list to see what's interesting. When you want to know more, select an object or property, etc., then press F1 to see its Help topic. In other words, use the Object Browser as an index to the Help on the Outlook object model. ----------------------------------------------- Some more helpful links: http://www.microsoft.com/office/previous/outlook/supreasy.asp http://www.windowsitpro.com/WindowsScripting/Article/ArticleID/22047/22047.html You probably want the Microsoft Script Debugger: http://www.microsoft.com/downloads/details.aspx?FamilyId=E606E71F-BA7F-471E-A57D-F2216D81EC3D&displaylang=en and here's some info on Microsoft Scripting: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnanchor/html/scriptinga.asp What you want to do is not that complicated, provided you climb the huge tar-baby learning curve that Microsoft throws at you. Let me know if you need more help. John __________________________________ Do you Yahoo!? Yahoo! Mail - Helps protect you from nasty viruses. http://promotions.yahoo.com/new_mail
