PC Review


Reply
Thread Tools Rate Thread

Creating webview folders inside a folder

 
 
Water Cooler v2
Guest
Posts: n/a
 
      14th Oct 2005
I am creating a heirarchy of sub-folders, each with a web view and a
web url.

It all works fine for the main top level folder. However, when I click
on the sub folders, they do not have their web view on. Nor do they
have a web url in their properties. What gives?

Here's the code.



Private Sub Login()
Dim lSettings As Settings = GetPersistedSettings()
Dim nm As Outlook.NameSpace
Dim folders As Outlook.Folders
Dim fldfoo As Outlook.MAPIFolder
Dim exp As Outlook.Explorer

nm = applicationObject.GetNamespace("MAPI")
nm.AddStore("foo.pst")
fldfoo = nm.Folders.GetLast()
fldfoo.Name = "foo"
fldfoo.WebViewOn = True
fldfoo.WebViewURL = "http://test.foo.com/login2.jsp?userId=" &
lSettings.UserName & "&password=" & lSettings.Password
fldfoo.WebViewAllowNavigation = True
exp = CType(applicationObject,
Outlook.Application).ActiveExplorer
Log.Write("Set the exp object to the active explorer in
Outlook")
exp.CurrentFolder = fldfoo
Log.Write("Set the newly created foo folder as the current
folder in the active explorer")
Call CreateSubFolders(fldfoo)

End Sub

Private Sub CreateSubFolders(ByVal fldfoo As Outlook.MAPIFolder)
Dim doc As XmlDocument = New XmlDocument
doc.Load("http://support.foo.com/uitabs.xml")
Log.Write("Loaded XML doc")
If doc Is Nothing Then Exit Sub
Log.Write("XML doc has content")
Call CreateSubFolder(doc.DocumentElement, fldfoo)
Log.Write("finished creating folder heirarchy")
doc = Nothing
End Sub

Private Sub CreateSubFolder(ByVal ndParent As XmlNode, ByVal
fldParent As Outlook.MAPIFolder)

Log.Write("Entered CreateSubFolder")
For Each nd As XmlNode In ndParent.ChildNodes
If TypeOf nd Is XmlElement Then
If nd.Name = "uitab" Then
Log.Write("For Each nd As XmlNode In nd.ChildNodes:
" & nd.Name)
If Not nd.Attributes Is Nothing Then
Log.Write("If nd.Attributes.Count > 0 Then")
If (Not (nd.Attributes("display") Is Nothing))
Then
Log.Write("nd " &
nd.Attributes("display").Value)
Dim fldNew As Outlook.MAPIFolder =
fldParent.Folders.Add(nd.Attributes("display").Value)
Log.Write("Created a new MAPI Folder: " &
nd.Attributes("display").Value)

fldNew.WebViewOn = True
fldNew.WebViewURL =
nd.Attributes("href").Value
Dim StrURL As String =
nd.Attributes("href").Value
Log.Write(StrURL)
fldNew.WebViewAllowNavigation = True

Log.Write("Set the description")
If nd.HasChildNodes Then
Log.Write("nd has child nodes")
Call CreateSubFolder(nd, fldNew)
End If
End If
End If
End If
End If
Next
End Sub

 
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating new Personal folder with folders and sub folders Srini Microsoft Outlook Discussion 1 19th Aug 2009 09:15 AM
change permission on all files inside a folder or hundreds of file inside a folder Anthony B Windows Vista Security 2 29th Dec 2007 12:08 AM
Creating webview folders inside a folder Water Cooler v2 Microsoft Outlook VBA Programming 0 14th Oct 2005 01:55 AM
FP Creating its own folders VTI_CNF folder Lauren Microsoft Frontpage 4 20th Apr 2005 07:16 PM
Can't Delete or Rename Folders after deleting files inside that folder =?Utf-8?B?UmF2ZW4=?= Microsoft Windows 2000 1 3rd Jan 2004 08:40 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:52 PM.