E
eddieaikau
Hi
I added a customised folder view using some modified vb code that i changed
to use in vba (see code at end).
This created customised view for a specific folder at work.
The migrated across to exchange 2003 and now the acutal 'fields' in the view
still exist but are blank for any new emails that are forwarded into the
folder with the customised view, all the old emails are fine only new ones.
Could anyone please help with what I need to do to fix this as no one hear
can help me (at work).
Using Outlook 2002 sp3.
thanks heaps
matt
Sub CreateView()
'Creates a new view
'need to also turn on the "Microsoft Scripting Runtime" reference library on
before running
Dim olApp As Outlook.Application
Dim objName As NameSpace
Dim objViews As Views
Dim objNewView As View
Dim fs As FileSystemObject
Set fs = CreateObject("Scripting.FileSystemObject")
Set olApp = Outlook.Application
Set objName = olApp.GetNamespace("MAPI")
Set objViews = objName.GetDefaultFolder(6).Views
Set objNewView = objViews.Add(Name:="RIM Fields", _
ViewType:=olTableView,
SaveOption:=olViewSaveOptionAllFoldersOfType)
objNewView.XML = fs.opentextfile("<insert file path>").readall
objNewView.Save
End Sub
AND THE XML FILE READS LIKE THIS BELOW...
<?xml version="1.0" ?>
- <view type="table">
<viewname>RIM Fields</viewname>
<viewstyle>font-family:Tahoma;font-style:normal;font-weight:normal;font-size:8pt;color:Black;table-layout:fixed;width:100%</viewstyle>
<viewtime>211843832</viewtime>
<linecolor>8421504</linecolor>
<linestyle>3</linestyle>
<collapsestate />
<rowstyle>background-color:#ffffff</rowstyle>
<headerstyle>background-color:#d3d3d3</headerstyle>
<previewstyle>color:Blue</previewstyle>
- <column>
<name>HREF</name>
<prop>DAV:href</prop>
<checkbox>1</checkbox>
</column>
- <column>
<heading>Importance</heading>
<prop>urn:schemas:httpmail:importance</prop>
<type>i4</type>
<bitmap>1</bitmap>
<width>10</width>
<style>text-align:center;padding-left:3px</style>
</column>
- <column>
<heading>Ticker</heading>
<prop>http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/Ticker</prop>
<type>string</type>
<width>29</width>
<style>text-align:left;padding-left:3px</style>
</column>
- <column>
<heading>Company Name</heading>
<prop>http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/Company%20Name</prop>
<type>string</type>
<width>29</width>
<style>text-align:left;padding-left:3px</style>
</column>
- <column>
<heading>Industry Name</heading>
<prop>http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/Industry%20Name</prop>
<type>string</type>
<width>29</width>
<style>text-align:left;padding-left:3px</style>
</column>
- <column>
<heading>Headline</heading>
<prop>http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/Headline</prop>
<type>string</type>
<width>28</width>
<style>text-align:left;padding-left:3px</style>
</column>
- <column>
<heading>Analyst Name</heading>
<prop>http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/Analyst%20Name</prop>
<type>string</type>
<width>28</width>
<style>text-align:left;padding-left:3px</style>
</column>
- <column>
<heading>Rating</heading>
<prop>http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/Rating</prop>
<type>string</type>
<width>28</width>
<style>text-align:left;padding-left:3px</style>
</column>
- <column>
<heading>Market Cap</heading>
<prop>http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/Market%20Cap</prop>
<type>fixed.14.4</type>
<width>30</width>
<style>text-align:right;padding-left:3px</style>
<displayformat>1</displayformat>
</column>
- <column>
<heading>Publish City Code</heading>
<prop>http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/Publish%20City%20Code</prop>
<type>string</type>
<width>27</width>
<style>text-align:left;padding-left:3px</style>
</column>
- <column>
<heading>Source</heading>
<prop>http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/Source</prop>
<type>string</type>
<width>28</width>
<style>text-align:left;padding-left:3px</style>
</column>
- <column>
<heading>Effective Date time</heading>
<prop>http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/Effective%20Date%20time</prop>
<type>datetime</type>
<width>28</width>
<style>text-align:left;padding-left:3px</style>
<format>M/d/yyyy||h:mm tt</format>
<displayformat>2</displayformat>
</column>
- <column>
<heading>Received</heading>
<prop>urn:schemas:httpmail:datereceived</prop>
<type>datetime</type>
<width>35</width>
<style>text-align:left;padding-left:3px</style>
<format>M/d/yyyy||h:mm tt</format>
<displayformat>2</displayformat>
</column>
- <column>
<heading>Rating Delta</heading>
<prop>http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/Rating%20Delta</prop>
<type>string</type>
<width>33</width>
<style>text-align:left;padding-left:3px</style>
</column>
- <column>
<heading>Prev Rating</heading>
<prop>http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/Prev%20Rating</prop>
<type>string</type>
<width>34</width>
<style>text-align:left;padding-left:3px</style>
</column>
- <column>
<heading>Country of Domicile</heading>
<prop>http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/Country%20of%20Domicile</prop>
<type>string</type>
<width>34</width>
<style>text-align:left;padding-left:3px</style>
</column>
- <column>
<heading>Est Delta</heading>
<prop>http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/Est%20Delta</prop>
<type>string</type>
<width>15</width>
<style>text-align:left;padding-left:3px</style>
</column>
- <column>
<heading>Quant Rating</heading>
<prop>http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/Quant%20Rating</prop>
<type>string</type>
<width>34</width>
<style>text-align:left;padding-left:3px</style>
</column>
- <column>
<heading>TSE</heading>
<prop>http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/TSE</prop>
<type>string</type>
<width>10</width>
<style>text-align:left;padding-left:8px</style>
</column>
- <column>
<heading>Country Rating Delta</heading>
<prop>http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/Country%20Rating%20Delta</prop>
<type>string</type>
<width>10</width>
<style>text-align:left;padding-left:8px</style>
</column>
- <column>
<heading>Country Rating</heading>
<prop>http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/Country%20Rating</prop>
<type>string</type>
<width>10</width>
<style>text-align:left;padding-left:8px</style>
</column>
- <column>
<heading>Prev Country Rating</heading>
<prop>http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/Prev%20Country%20Rating</prop>
<type>string</type>
<width>10</width>
<style>text-align:left;padding-left:8px</style>
</column>
- <column>
<heading>Tech Rating</heading>
<prop>http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/Tech%20Rating</prop>
<type>string</type>
<width>10</width>
<style>text-align:left;padding-left:8px</style>
</column>
- <orderby>
- <order>
<heading>Received</heading>
<prop>urn:schemas:httpmail:datereceived</prop>
<type>datetime</type>
<sort>desc</sort>
</order>
</orderby>
<groupbydefault>2</groupbydefault>
- <previewpane>
<visible>1</visible>
<markasread>0</markasread>
<previewwidth>0</previewwidth>
<previewheight>500</previewheight>
</previewpane>
</view>
I added a customised folder view using some modified vb code that i changed
to use in vba (see code at end).
This created customised view for a specific folder at work.
The migrated across to exchange 2003 and now the acutal 'fields' in the view
still exist but are blank for any new emails that are forwarded into the
folder with the customised view, all the old emails are fine only new ones.
Could anyone please help with what I need to do to fix this as no one hear
can help me (at work).
Using Outlook 2002 sp3.
thanks heaps
matt
Sub CreateView()
'Creates a new view
'need to also turn on the "Microsoft Scripting Runtime" reference library on
before running
Dim olApp As Outlook.Application
Dim objName As NameSpace
Dim objViews As Views
Dim objNewView As View
Dim fs As FileSystemObject
Set fs = CreateObject("Scripting.FileSystemObject")
Set olApp = Outlook.Application
Set objName = olApp.GetNamespace("MAPI")
Set objViews = objName.GetDefaultFolder(6).Views
Set objNewView = objViews.Add(Name:="RIM Fields", _
ViewType:=olTableView,
SaveOption:=olViewSaveOptionAllFoldersOfType)
objNewView.XML = fs.opentextfile("<insert file path>").readall
objNewView.Save
End Sub
AND THE XML FILE READS LIKE THIS BELOW...
<?xml version="1.0" ?>
- <view type="table">
<viewname>RIM Fields</viewname>
<viewstyle>font-family:Tahoma;font-style:normal;font-weight:normal;font-size:8pt;color:Black;table-layout:fixed;width:100%</viewstyle>
<viewtime>211843832</viewtime>
<linecolor>8421504</linecolor>
<linestyle>3</linestyle>
<collapsestate />
<rowstyle>background-color:#ffffff</rowstyle>
<headerstyle>background-color:#d3d3d3</headerstyle>
<previewstyle>color:Blue</previewstyle>
- <column>
<name>HREF</name>
<prop>DAV:href</prop>
<checkbox>1</checkbox>
</column>
- <column>
<heading>Importance</heading>
<prop>urn:schemas:httpmail:importance</prop>
<type>i4</type>
<bitmap>1</bitmap>
<width>10</width>
<style>text-align:center;padding-left:3px</style>
</column>
- <column>
<heading>Ticker</heading>
<prop>http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/Ticker</prop>
<type>string</type>
<width>29</width>
<style>text-align:left;padding-left:3px</style>
</column>
- <column>
<heading>Company Name</heading>
<prop>http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/Company%20Name</prop>
<type>string</type>
<width>29</width>
<style>text-align:left;padding-left:3px</style>
</column>
- <column>
<heading>Industry Name</heading>
<prop>http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/Industry%20Name</prop>
<type>string</type>
<width>29</width>
<style>text-align:left;padding-left:3px</style>
</column>
- <column>
<heading>Headline</heading>
<prop>http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/Headline</prop>
<type>string</type>
<width>28</width>
<style>text-align:left;padding-left:3px</style>
</column>
- <column>
<heading>Analyst Name</heading>
<prop>http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/Analyst%20Name</prop>
<type>string</type>
<width>28</width>
<style>text-align:left;padding-left:3px</style>
</column>
- <column>
<heading>Rating</heading>
<prop>http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/Rating</prop>
<type>string</type>
<width>28</width>
<style>text-align:left;padding-left:3px</style>
</column>
- <column>
<heading>Market Cap</heading>
<prop>http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/Market%20Cap</prop>
<type>fixed.14.4</type>
<width>30</width>
<style>text-align:right;padding-left:3px</style>
<displayformat>1</displayformat>
</column>
- <column>
<heading>Publish City Code</heading>
<prop>http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/Publish%20City%20Code</prop>
<type>string</type>
<width>27</width>
<style>text-align:left;padding-left:3px</style>
</column>
- <column>
<heading>Source</heading>
<prop>http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/Source</prop>
<type>string</type>
<width>28</width>
<style>text-align:left;padding-left:3px</style>
</column>
- <column>
<heading>Effective Date time</heading>
<prop>http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/Effective%20Date%20time</prop>
<type>datetime</type>
<width>28</width>
<style>text-align:left;padding-left:3px</style>
<format>M/d/yyyy||h:mm tt</format>
<displayformat>2</displayformat>
</column>
- <column>
<heading>Received</heading>
<prop>urn:schemas:httpmail:datereceived</prop>
<type>datetime</type>
<width>35</width>
<style>text-align:left;padding-left:3px</style>
<format>M/d/yyyy||h:mm tt</format>
<displayformat>2</displayformat>
</column>
- <column>
<heading>Rating Delta</heading>
<prop>http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/Rating%20Delta</prop>
<type>string</type>
<width>33</width>
<style>text-align:left;padding-left:3px</style>
</column>
- <column>
<heading>Prev Rating</heading>
<prop>http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/Prev%20Rating</prop>
<type>string</type>
<width>34</width>
<style>text-align:left;padding-left:3px</style>
</column>
- <column>
<heading>Country of Domicile</heading>
<prop>http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/Country%20of%20Domicile</prop>
<type>string</type>
<width>34</width>
<style>text-align:left;padding-left:3px</style>
</column>
- <column>
<heading>Est Delta</heading>
<prop>http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/Est%20Delta</prop>
<type>string</type>
<width>15</width>
<style>text-align:left;padding-left:3px</style>
</column>
- <column>
<heading>Quant Rating</heading>
<prop>http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/Quant%20Rating</prop>
<type>string</type>
<width>34</width>
<style>text-align:left;padding-left:3px</style>
</column>
- <column>
<heading>TSE</heading>
<prop>http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/TSE</prop>
<type>string</type>
<width>10</width>
<style>text-align:left;padding-left:8px</style>
</column>
- <column>
<heading>Country Rating Delta</heading>
<prop>http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/Country%20Rating%20Delta</prop>
<type>string</type>
<width>10</width>
<style>text-align:left;padding-left:8px</style>
</column>
- <column>
<heading>Country Rating</heading>
<prop>http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/Country%20Rating</prop>
<type>string</type>
<width>10</width>
<style>text-align:left;padding-left:8px</style>
</column>
- <column>
<heading>Prev Country Rating</heading>
<prop>http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/Prev%20Country%20Rating</prop>
<type>string</type>
<width>10</width>
<style>text-align:left;padding-left:8px</style>
</column>
- <column>
<heading>Tech Rating</heading>
<prop>http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/Tech%20Rating</prop>
<type>string</type>
<width>10</width>
<style>text-align:left;padding-left:8px</style>
</column>
- <orderby>
- <order>
<heading>Received</heading>
<prop>urn:schemas:httpmail:datereceived</prop>
<type>datetime</type>
<sort>desc</sort>
</order>
</orderby>
<groupbydefault>2</groupbydefault>
- <previewpane>
<visible>1</visible>
<markasread>0</markasread>
<previewwidth>0</previewwidth>
<previewheight>500</previewheight>
</previewpane>
</view>