Page 1 of 1 1
Topic Options
#190156 - 2008-10-17 11:02 PM Add folder to Outlook with Home Page
evan Offline
Just in Town

Registered: 2008-10-17
Posts: 3
We need to put a folder in outlook that shows an internal webpage when clicked. Basically we add the folder, then in the properties change the home page to the URL we want to display.

Instead of going to all 1000 clients, is there a way to write this in kixtart?

Top
#190157 - 2008-10-17 11:20 PM Re: Add folder to Outlook with Home Page [Re: evan]
evan Offline
Just in Town

Registered: 2008-10-17
Posts: 3
Here is the code to add the folder in VBScript:

Const olFolderInbox = 6

Set objOutlook = CreateObject("Outlook.Application")
Set objNamespace = objOutlook.GetNamespace("MAPI")
Set objFolder = objNamespace.GetDefaultFolder(olFolderInbox)

strFolderName = objFolder.Parent
Set objMailbox = objNamespace.Folders(strFolderName)

Set objNewFolder = objMailbox.Folders.Add("Scripts Received")

Top
#190158 - 2008-10-17 11:34 PM Re: Add folder to Outlook with Home Page [Re: evan]
evan Offline
Just in Town

Registered: 2008-10-17
Posts: 3
Complete Code without error detection in VB:

Const olFolderInbox = 6

Set objOutlook = CreateObject("Outlook.Application")
Set objNamespace = objOutlook.GetNamespace("MAPI")
Set objFolder = objNamespace.GetDefaultFolder(olFolderInbox)

strFolderName = objFolder.Parent
Set objMailbox = objNamespace.Folders(strFolderName)

Set objNewFolder = objMailbox.Folders.Add("Employee Directory")
objNewFolder.WebViewURL = "http://192.168.61.100/StaffView"
objNewFolder.WebViewOn = True

Would it be easier just to reference this VB script in the Kix batch file?

Top
#190159 - 2008-10-18 12:42 AM Re: Add folder to Outlook with Home Page [Re: evan]
Allen Administrator Offline
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4572
Loc: USA
Straight conversion. Untested. Try it and see how far you get.

 Code:
$olFolderInbox = 6

$objOutlook = CreateObject("Outlook.Application")
$objNamespace = $objOutlook.GetNamespace("MAPI")
$objFolder = $objNamespace.GetDefaultFolder($olFolderInbox)

$strFolderName = $objFolder.Parent
$objMailbox = $objNamespace.Folders($strFolderName)

$objNewFolder = $objMailbox.Folders.Add("Employee Directory")
$objNewFolder.WebViewURL = "http://192.168.61.100/StaffView"
$objNewFolder.WebViewOn = not 0 ;True
_________________________
(... better days ahead)

Top
#190160 - 2008-10-18 12:44 AM Re: Add folder to Outlook with Home Page [Re: evan]
Gargoyle Offline
MM club member
*****

Registered: 2004-03-09
Posts: 1597
Loc: Valley of the Sun (Arizona, US...
Quick and dirty translation
 Code:
$olFolderInbox = 6

$objOutlook = CreateObject("Outlook.Application")
$objNamespace = $objOutlook.GetNamespace("MAPI")
$objFolder = $objNamespace.GetDefaultFolder($olFolderInbox)

$FolderName = $objFolder.Parent
$objMailbox = $objNamespace.Folders($FolderName)

$objNewFolder = $objMailbox.Folders.Add("Employee Directory")
$objNewFolder.WebViewURL = "http://192.168.61.100/StaffView"
$objNewFolder.WebViewOn = True

Untested use at your own risk
_________________________
Today is the tomorrow you worried about yesterday.

Top
#190161 - 2008-10-18 12:46 AM Re: Add folder to Outlook with Home Page [Re: Gargoyle]
Allen Administrator Offline
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4572
Loc: USA
LOL... Gargs. That looks familiar... I got the faster trigger this time ;\)
_________________________
(... better days ahead)

Top
#190166 - 2008-10-18 04:10 PM Re: Add folder to Outlook with Home Page [Re: Allen]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
the posts are over minute apart, so not really even that close yet \:\)
_________________________
!

download KiXnet

Top
Page 1 of 1 1


Moderator:  Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 2220 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.067 seconds in which 0.034 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org