Re: Custom view is not working

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



And what's not working?

If it's not showing the custom property is that property on those items and added to the folder properties?

Other than that you're going to have to find out what's different about your machines and where it's not working.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Dhananjay" <pandit.dhananjay@xxxxxxxxx> wrote in message news:1192284342.381807.148790@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi All,
I am creating custom view. Following is my code snippet of one of my
commandbar button.

'-------------------------------------------------------------------------------------------------------------------
myView = CustomPublicFolder.Views("By Company")
myView.Reset()
myView.Apply()
AddTrace("Company View obtained")
objXML = CreateObject("MSXML2.DOMDocument.4.0")
AddTrace("XML object created")
' load into xml parser
objXML.loadXML(myView.XML)
AddTrace("XML Loaded")
objRoot = objXML.documentElement
AddTrace("Root obtained")
newNode = objXML.createNode(1, "filter", "")
AddTrace("Filter node created")
newNode.Text = """http://schemas.microsoft.com/mapi/string/
{00020329-0000-0000-C000-000000000046}/myCustomField"" LIKE '%" &
FilterType & "%'"
AddTrace("Filter applied - " & FilterType)
filterNode = objRoot.insertBefore(newNode,
objRoot.childNodes.Item(1))
myView.XML = objXML.XML

'Save and apply the new view.
myView.Save()
AddTrace("View Saved partially")
If objRoot.selectSingleNode("groupbydefault") Is Nothing
Then
newNode = objXML.createNode(1, "groupbydefault", "")
filterNode = objRoot.insertBefore(newNode,
objRoot.childNodes.Item(1))
Else
newNode = objRoot.selectSingleNode("groupbydefault")
End If
newNode.Text = "1"
AddTrace("Created collapsed view of company")
myView.XML = objXML.XML

'Save and apply the new view.
myView.Save()
AddTrace("View saved")
myView.Apply()
'-------------------------------------------------------------------------------------------------------------------
This code is working fine on all of our machines (with clean machines
too). But on one of our client machine it is not working. If I print
myView.xml in the trace file then it is showing me perfect xml, but
view is not applied successfully.
My addin is VSTO addin for office 2003 in VB2005.

Thanks,
Dhananjay


.



Relevant Pages

  • Re: Hello everyone: NO, I didnt miss the DE-compressor reference, I read it
    ... I do need prove on files instead of between machines. ... video camera's to a room and from different angles, one showing a ... I was doing compression by finding patterns in random ... Friends of mine repeatedly wondered if anything would be convining ...
    (comp.compression)
  • Re: Hello everyone: NO, I didnt miss the DE-compressor reference, I read it
    ... I do need prove on files instead of between machines. ... video camera's to a room and from different angles, one showing a ... I was doing compression by finding patterns in random ... substantial merit. ...
    (comp.compression)
  • Re: Network passwords
    ... the local radion station is showing a similar problem. ... the computer is showing under the network group it does ask for a password ... router and the third is a wireless connection to the router, ... I am the only user on all 3 machines each set up as ...
    (uk.comp.misc)
  • Re: AD Clients not seeing Site Code
    ... 650 are showing up with the site code "xxx". ... showing assigned, and have the advanced client. ... machines, is there a quick way to get these clients talking? ...
    (microsoft.public.sms.admin)
  • Custom view is not working
    ... Following is my code snippet of one of my ... filterNode = objRoot.insertBefore(newNode, ... This code is working fine on all of our machines (with clean machines ... My addin is VSTO addin for office 2003 in VB2005. ...
    (microsoft.public.outlook.program_vba)