Email custom form

J

jocker

Having spent a whole day studying this newsgroup and viewing Sue Mosher's
excellent website I am still stuck with this problem.
I use Outlook 2003 and wish to do the following:-
Move an incoming email from the Inbox to a folder which I have created as
"Post" and then "Note".
Use a custom form in this folder to insert additional details into the
email.

I have created new forms as Post and as Message and as Note message
classes, published it as instructed but still get the
"you cannot create an item of this type in this folder"

Surely in this day and age, when we have put men on the moon, this shouldn't
be too difficult even for an old age pensioner like me.

I have previously produced a new custom form for "Contacts" which works a
treat but am now considering a brain transplant.

Please help, if you have time, in words of one syllable.
 
S

Sue Mosher [MVP-Outlook]

I use Outlook 2003 and wish to do the following:-
Move an incoming email from the Inbox to a folder which I have created as
"Post" and then "Note".

Sorry, but you lost me right there. What did you create "as 'Post' and then 'Note'."
A new folder to store messages should be created as a folder to hold mail and post items.
Use a custom form in this folder to insert additional details into the
email.

You'll need to change the MessageClass property value on each message (and save the message) to make it use the custom form.
I have created new forms as Post and as Message and as Note message
classes, published it as instructed but still get the
"you cannot create an item of this type in this folder"

What is the exact message class you used to publish the form? Where did you publish it? Is the folder restricted as to the type of forms its items can use?

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
J

jocker

Sorry to confuse, I was trying to show that I had tried all the
alternatives.
I have created a new folder "aaa" to hold Mail and Post items.
I have created a new form with one additional field and published it In
Personal Folders as "IPM.Note.myform"
I then go to the folder's properties, select "Forms..." in "When posting to
this folder use:-" , located my new form in the dropdown, select "myform",
click "Open" and I get the message "You cannot create an item of this type
in this folder".

++++++++++++++++

No restrictions on folder use. Standalone Windows XP computer with Outlook
2003.
Sue Mosher said:
I use Outlook 2003 and wish to do the following:-
Move an incoming email from the Inbox to a folder which I have created as
"Post" and then "Note".

Sorry, but you lost me right there. What did you create "as 'Post' and then
'Note'."
A new folder to store messages should be created as a folder to hold mail
and post items.
Use a custom form in this folder to insert additional details into the
email.

You'll need to change the MessageClass property value on each message (and
save the message) to make it use the custom form.
I have created new forms as Post and as Message and as Note message
classes, published it as instructed but still get the
"you cannot create an item of this type in this folder"

What is the exact message class you used to publish the form? Where did you
publish it? Is the folder restricted as to the type of forms its items can
use?

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
S

Sue Mosher [MVP-Outlook]

Message forms are designed to be sent, not posted to folders. You cannot make a message form the default form for any folder.

That doesn't mean you can't use a message form. It just can't be the default form for a folder. If you want existing messages to use that form, you'll need to write code to change the value of the MessageClass property to use the "IPM.Note.myform" class.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
J

jocker

Yes, I've understood that from a lot of your previous postings but does that
mean I have to change the Message Class while the message is still in the
Inbox?

Oh, Bill Gates, you have a lot to answer for.

Thanks for your help though.

++++++++++++++

Message forms are designed to be sent, not posted to folders. You cannot
make a message form the default form for any folder.

That doesn't mean you can't use a message form. It just can't be the default
form for a folder. If you want existing messages to use that form, you'll
need to write code to change the value of the MessageClass property to use
the "IPM.Note.myform" class.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
S

Sue Mosher [MVP-Outlook]

If you change it in the Inbox but the form is published only to the other folder, you'll get an error message if you try to open the item while it's still in the Inbox. Better to change the message class at the same time you move it into the other folder. You can either write a VBA macro to do both operations or use the MAPIFolder.Items.ItemAdd method to detect a new item in the target folder and change it then.
--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
J

jocker

Gotcha.Many thanks.
Could you give me the code to do this as I'm not sure how to modify
MAPIFolder.Items.ItemAdd


If you change it in the Inbox but the form is published only to the other
folder, you'll get an error message if you try to open the item while it's
still in the Inbox. Better to change the message class at the same time you
move it into the other folder. You can either write a VBA macro to do both
operations or use the MAPIFolder.Items.ItemAdd method to detect a new item
in the target folder and change it then.
--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
S

Sue Mosher [MVP-Outlook]

This is pretty simple VBA code for the ThisOutlookSession module:

Private WithEvents colItems As Outlook.Items

Private Sub Application_Startup()
' some code to get the desired objFolder [1]
Set objFolder = <whatever>
Set colItems = objFolder.Items
End Sub

Private Sub colItems_ItemAdd(ByVal Item As Object)
If Item.MessageClass = "IPM.Note" Then
Item.MessageClass = "IPM.Note.NewClass"
Item.Save
End If
End Sub

[1] To get a non-default folder, you need to walk the folder hierarchy using the Folders collections or a known folder or use a function that does that for you. See http://www.outlookcode.com/d/code/getfolder.htm

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
J

jocker

Sue, I tried this but it does not appear to call the Sub colItems.
My full code is :-

Private WithEvents colItems As Outlook.Items

Private Sub Application_Startup()
' some code to get the desired objFolder [1]
Set objFolder = GetFolder("Personal Folders/aaa")
Set colItems = objFolder.Items
End Sub



Public Function GetFolder(strFolderPath As String) As MAPIFolder
' folder path needs to be something like
' "Public Folders\All Public Folders\Company\Sales"
Dim objApp As Outlook.Application
Dim objNS As Outlook.NameSpace
Dim colFolders As Outlook.Folders
Dim objFolder As Outlook.MAPIFolder
Dim arrFolders() As String
Dim I As Long
On Error Resume Next

strFolderPath = Replace(strFolderPath, "/", "\")
arrFolders() = Split(strFolderPath, "\")
Set objApp = CreateObject("Outlook.Application")
Set objNS = objApp.GetNamespace("MAPI")
Set objFolder = objNS.Folders.Item(arrFolders(0))
If Not objFolder Is Nothing Then
For I = 1 To UBound(arrFolders)
Set colFolders = objFolder.Folders
Set objFolder = Nothing
Set objFolder = colFolders.Item(arrFolders(I))
If objFolder Is Nothing Then
Exit For
End If
Next
End If

Set GetFolder = objFolder
' MsgBox objFolder
Set colFolders = Nothing
Set objNS = Nothing
Set objApp = Nothing
End Function
Private Sub colItems_ItemAdd(ByVal Item As Object)
If Item.MessageClass = "IPM.Note" Then
Item.MessageClass = "IPM.Note.myform"
Item.Save
End If
End Sub

++++++++++++++++++++++++++++++++++++++++++++++++



This is pretty simple VBA code for the ThisOutlookSession module:

Private WithEvents colItems As Outlook.Items

Private Sub Application_Startup()
' some code to get the desired objFolder [1]
Set objFolder = <whatever>
Set colItems = objFolder.Items
End Sub

Private Sub colItems_ItemAdd(ByVal Item As Object)
If Item.MessageClass = "IPM.Note" Then
Item.MessageClass = "IPM.Note.NewClass"
Item.Save
End If
End Sub

[1] To get a non-default folder, you need to walk the folder hierarchy using
the Folders collections or a known folder or use a function that does that
for you. See http://www.outlookcode.com/d/code/getfolder.htm

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
S

Sue Mosher [MVP-Outlook]

Does other VBA code run? Have you checked the basics like security at http://www.outlookcode.com/d/vbabasics.htm

Is "aaa" a top-level folder in a .pst file with the display name Personal Folders? If not, then you need to adjust the path string to use the actual path.

Commenting out the On Error Resume Next statement would also be a good troubleshooting step.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers


jocker said:
Sue, I tried this but it does not appear to call the Sub colItems.
My full code is :-

Private WithEvents colItems As Outlook.Items

Private Sub Application_Startup()
' some code to get the desired objFolder [1]
Set objFolder = GetFolder("Personal Folders/aaa")
Set colItems = objFolder.Items
End Sub



Public Function GetFolder(strFolderPath As String) As MAPIFolder
' folder path needs to be something like
' "Public Folders\All Public Folders\Company\Sales"
Dim objApp As Outlook.Application
Dim objNS As Outlook.NameSpace
Dim colFolders As Outlook.Folders
Dim objFolder As Outlook.MAPIFolder
Dim arrFolders() As String
Dim I As Long
On Error Resume Next

strFolderPath = Replace(strFolderPath, "/", "\")
arrFolders() = Split(strFolderPath, "\")
Set objApp = CreateObject("Outlook.Application")
Set objNS = objApp.GetNamespace("MAPI")
Set objFolder = objNS.Folders.Item(arrFolders(0))
If Not objFolder Is Nothing Then
For I = 1 To UBound(arrFolders)
Set colFolders = objFolder.Folders
Set objFolder = Nothing
Set objFolder = colFolders.Item(arrFolders(I))
If objFolder Is Nothing Then
Exit For
End If
Next
End If

Set GetFolder = objFolder
' MsgBox objFolder
Set colFolders = Nothing
Set objNS = Nothing
Set objApp = Nothing
End Function
Private Sub colItems_ItemAdd(ByVal Item As Object)
If Item.MessageClass = "IPM.Note" Then
Item.MessageClass = "IPM.Note.myform"
Item.Save
End If
End Sub

++++++++++++++++++++++++++++++++++++++++++++++++



This is pretty simple VBA code for the ThisOutlookSession module:

Private WithEvents colItems As Outlook.Items

Private Sub Application_Startup()
' some code to get the desired objFolder [1]
Set objFolder = <whatever>
Set colItems = objFolder.Items
End Sub

Private Sub colItems_ItemAdd(ByVal Item As Object)
If Item.MessageClass = "IPM.Note" Then
Item.MessageClass = "IPM.Note.NewClass"
Item.Save
End If
End Sub

[1] To get a non-default folder, you need to walk the folder hierarchy using
the Folders collections or a known folder or use a function that does that
for you. See http://www.outlookcode.com/d/code/getfolder.htm
 
J

jocker

Yes, all my other code works fine.
"aaa" is a top level folder in Personal Folders"
The code at "Set objFolder = GetFolder("Personal Folders/aaa")" finds
"aaa" but does not then run the " Set colItems = objFolder.Items" . It
just skips over it.

Shouild I just print my emails and add fields by hand :)

I do appreciate your help and wonder how you have time to eat, sleep, write
books and answer everyones problems.

+++++++++++++++++++++


Does other VBA code run? Have you checked the basics like security at
http://www.outlookcode.com/d/vbabasics.htm

Is "aaa" a top-level folder in a .pst file with the display name Personal
Folders? If not, then you need to adjust the path string to use the actual
path.

Commenting out the On Error Resume Next statement would also be a good
troubleshooting step.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers


jocker said:
Sue, I tried this but it does not appear to call the Sub colItems.
My full code is :-

Private WithEvents colItems As Outlook.Items

Private Sub Application_Startup()
' some code to get the desired objFolder [1]
Set objFolder = GetFolder("Personal Folders/aaa")
Set colItems = objFolder.Items
End Sub



Public Function GetFolder(strFolderPath As String) As MAPIFolder
' folder path needs to be something like
' "Public Folders\All Public Folders\Company\Sales"
Dim objApp As Outlook.Application
Dim objNS As Outlook.NameSpace
Dim colFolders As Outlook.Folders
Dim objFolder As Outlook.MAPIFolder
Dim arrFolders() As String
Dim I As Long
On Error Resume Next

strFolderPath = Replace(strFolderPath, "/", "\")
arrFolders() = Split(strFolderPath, "\")
Set objApp = CreateObject("Outlook.Application")
Set objNS = objApp.GetNamespace("MAPI")
Set objFolder = objNS.Folders.Item(arrFolders(0))
If Not objFolder Is Nothing Then
For I = 1 To UBound(arrFolders)
Set colFolders = objFolder.Folders
Set objFolder = Nothing
Set objFolder = colFolders.Item(arrFolders(I))
If objFolder Is Nothing Then
Exit For
End If
Next
End If

Set GetFolder = objFolder
' MsgBox objFolder
Set colFolders = Nothing
Set objNS = Nothing
Set objApp = Nothing
End Function
Private Sub colItems_ItemAdd(ByVal Item As Object)
If Item.MessageClass = "IPM.Note" Then
Item.MessageClass = "IPM.Note.myform"
Item.Save
End If
End Sub

++++++++++++++++++++++++++++++++++++++++++++++++



This is pretty simple VBA code for the ThisOutlookSession module:

Private WithEvents colItems As Outlook.Items

Private Sub Application_Startup()
' some code to get the desired objFolder [1]
Set objFolder = <whatever>
Set colItems = objFolder.Items
End Sub

Private Sub colItems_ItemAdd(ByVal Item As Object)
If Item.MessageClass = "IPM.Note" Then
Item.MessageClass = "IPM.Note.NewClass"
Item.Save
End If
End Sub

[1] To get a non-default folder, you need to walk the folder hierarchy
using
the Folders collections or a known folder or use a function that does that
for you. See http://www.outlookcode.com/d/code/getfolder.htm
 
S

Sue Mosher [MVP-Outlook]

Comment out the "On Error Resume Next" statement and step through the code and you'll likely find the problem. Do you have more than one information store with the display name "Personal Folders"?

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers


jocker said:
Yes, all my other code works fine.
"aaa" is a top level folder in Personal Folders"
The code at "Set objFolder = GetFolder("Personal Folders/aaa")" finds
"aaa" but does not then run the " Set colItems = objFolder.Items" .. It
just skips over it.
Does other VBA code run? Have you checked the basics like security at
http://www.outlookcode.com/d/vbabasics.htm

Is "aaa" a top-level folder in a .pst file with the display name Personal
Folders? If not, then you need to adjust the path string to use the actual
path.

Commenting out the On Error Resume Next statement would also be a good
troubleshooting step.

jocker said:
Sue, I tried this but it does not appear to call the Sub colItems.
My full code is :-

Private WithEvents colItems As Outlook.Items

Private Sub Application_Startup()
' some code to get the desired objFolder [1]
Set objFolder = GetFolder("Personal Folders/aaa")
Set colItems = objFolder.Items
End Sub



Public Function GetFolder(strFolderPath As String) As MAPIFolder
' folder path needs to be something like
' "Public Folders\All Public Folders\Company\Sales"
Dim objApp As Outlook.Application
Dim objNS As Outlook.NameSpace
Dim colFolders As Outlook.Folders
Dim objFolder As Outlook.MAPIFolder
Dim arrFolders() As String
Dim I As Long
On Error Resume Next

strFolderPath = Replace(strFolderPath, "/", "\")
arrFolders() = Split(strFolderPath, "\")
Set objApp = CreateObject("Outlook.Application")
Set objNS = objApp.GetNamespace("MAPI")
Set objFolder = objNS.Folders.Item(arrFolders(0))
If Not objFolder Is Nothing Then
For I = 1 To UBound(arrFolders)
Set colFolders = objFolder.Folders
Set objFolder = Nothing
Set objFolder = colFolders.Item(arrFolders(I))
If objFolder Is Nothing Then
Exit For
End If
Next
End If

Set GetFolder = objFolder
' MsgBox objFolder
Set colFolders = Nothing
Set objNS = Nothing
Set objApp = Nothing
End Function
Private Sub colItems_ItemAdd(ByVal Item As Object)
If Item.MessageClass = "IPM.Note" Then
Item.MessageClass = "IPM.Note.myform"
Item.Save
End If
End Sub

++++++++++++++++++++++++++++++++++++++++++++++++



This is pretty simple VBA code for the ThisOutlookSession module:

Private WithEvents colItems As Outlook.Items

Private Sub Application_Startup()
' some code to get the desired objFolder [1]
Set objFolder = <whatever>
Set colItems = objFolder.Items
End Sub

Private Sub colItems_ItemAdd(ByVal Item As Object)
If Item.MessageClass = "IPM.Note" Then
Item.MessageClass = "IPM.Note.NewClass"
Item.Save
End If
End Sub

[1] To get a non-default folder, you need to walk the folder hierarchy
using
the Folders collections or a known folder or use a function that does that
for you. See http://www.outlookcode.com/d/code/getfolder.htm
 
J

jocker

Had done all that - no joy. Thanks for trying.

Comment out the "On Error Resume Next" statement and step through the code
and you'll likely find the problem. Do you have more than one information
store with the display name "Personal Folders"?

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers


jocker said:
Yes, all my other code works fine.
"aaa" is a top level folder in Personal Folders"
The code at "Set objFolder = GetFolder("Personal Folders/aaa")" finds
"aaa" but does not then run the " Set colItems = objFolder.Items" . It
just skips over it.
Does other VBA code run? Have you checked the basics like security at
http://www.outlookcode.com/d/vbabasics.htm

Is "aaa" a top-level folder in a .pst file with the display name Personal
Folders? If not, then you need to adjust the path string to use the actual
path.

Commenting out the On Error Resume Next statement would also be a good
troubleshooting step.

jocker said:
Sue, I tried this but it does not appear to call the Sub colItems.
My full code is :-

Private WithEvents colItems As Outlook.Items

Private Sub Application_Startup()
' some code to get the desired objFolder [1]
Set objFolder = GetFolder("Personal Folders/aaa")
Set colItems = objFolder.Items
End Sub



Public Function GetFolder(strFolderPath As String) As MAPIFolder
' folder path needs to be something like
' "Public Folders\All Public Folders\Company\Sales"
Dim objApp As Outlook.Application
Dim objNS As Outlook.NameSpace
Dim colFolders As Outlook.Folders
Dim objFolder As Outlook.MAPIFolder
Dim arrFolders() As String
Dim I As Long
On Error Resume Next

strFolderPath = Replace(strFolderPath, "/", "\")
arrFolders() = Split(strFolderPath, "\")
Set objApp = CreateObject("Outlook.Application")
Set objNS = objApp.GetNamespace("MAPI")
Set objFolder = objNS.Folders.Item(arrFolders(0))
If Not objFolder Is Nothing Then
For I = 1 To UBound(arrFolders)
Set colFolders = objFolder.Folders
Set objFolder = Nothing
Set objFolder = colFolders.Item(arrFolders(I))
If objFolder Is Nothing Then
Exit For
End If
Next
End If

Set GetFolder = objFolder
' MsgBox objFolder
Set colFolders = Nothing
Set objNS = Nothing
Set objApp = Nothing
End Function
Private Sub colItems_ItemAdd(ByVal Item As Object)
If Item.MessageClass = "IPM.Note" Then
Item.MessageClass = "IPM.Note.myform"
Item.Save
End If
End Sub

++++++++++++++++++++++++++++++++++++++++++++++++



This is pretty simple VBA code for the ThisOutlookSession module:

Private WithEvents colItems As Outlook.Items

Private Sub Application_Startup()
' some code to get the desired objFolder [1]
Set objFolder = <whatever>
Set colItems = objFolder.Items
End Sub

Private Sub colItems_ItemAdd(ByVal Item As Object)
If Item.MessageClass = "IPM.Note" Then
Item.MessageClass = "IPM.Note.NewClass"
Item.Save
End If
End Sub

[1] To get a non-default folder, you need to walk the folder hierarchy
using
the Folders collections or a known folder or use a function that does
that
for you. See http://www.outlookcode.com/d/code/getfolder.htm
 
S

Sue Mosher [MVP-Outlook]

Is your code all in the built-in ThisOutlookSession module?
--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers


jocker said:
Had done all that - no joy. Thanks for trying.

Comment out the "On Error Resume Next" statement and step through the code
and you'll likely find the problem. Do you have more than one information
store with the display name "Personal Folders"?

jocker said:
Yes, all my other code works fine.
"aaa" is a top level folder in Personal Folders"
The code at "Set objFolder = GetFolder("Personal Folders/aaa")" finds
"aaa" but does not then run the " Set colItems = objFolder.Items" .. It
just skips over it.
Does other VBA code run? Have you checked the basics like security at
http://www.outlookcode.com/d/vbabasics.htm

Is "aaa" a top-level folder in a .pst file with the display name Personal
Folders? If not, then you need to adjust the path string to use the actual
path.

Commenting out the On Error Resume Next statement would also be a good
troubleshooting step.

jocker said:
Sue, I tried this but it does not appear to call the Sub colItems.
My full code is :-

Private WithEvents colItems As Outlook.Items

Private Sub Application_Startup()
' some code to get the desired objFolder [1]
Set objFolder = GetFolder("Personal Folders/aaa")
Set colItems = objFolder.Items
End Sub



Public Function GetFolder(strFolderPath As String) As MAPIFolder
' folder path needs to be something like
' "Public Folders\All Public Folders\Company\Sales"
Dim objApp As Outlook.Application
Dim objNS As Outlook.NameSpace
Dim colFolders As Outlook.Folders
Dim objFolder As Outlook.MAPIFolder
Dim arrFolders() As String
Dim I As Long
On Error Resume Next

strFolderPath = Replace(strFolderPath, "/", "\")
arrFolders() = Split(strFolderPath, "\")
Set objApp = CreateObject("Outlook.Application")
Set objNS = objApp.GetNamespace("MAPI")
Set objFolder = objNS.Folders.Item(arrFolders(0))
If Not objFolder Is Nothing Then
For I = 1 To UBound(arrFolders)
Set colFolders = objFolder.Folders
Set objFolder = Nothing
Set objFolder = colFolders.Item(arrFolders(I))
If objFolder Is Nothing Then
Exit For
End If
Next
End If

Set GetFolder = objFolder
' MsgBox objFolder
Set colFolders = Nothing
Set objNS = Nothing
Set objApp = Nothing
End Function
Private Sub colItems_ItemAdd(ByVal Item As Object)
If Item.MessageClass = "IPM.Note" Then
Item.MessageClass = "IPM.Note.myform"
Item.Save
End If
End Sub

++++++++++++++++++++++++++++++++++++++++++++++++



This is pretty simple VBA code for the ThisOutlookSession module:

Private WithEvents colItems As Outlook.Items

Private Sub Application_Startup()
' some code to get the desired objFolder [1]
Set objFolder = <whatever>
Set colItems = objFolder.Items
End Sub

Private Sub colItems_ItemAdd(ByVal Item As Object)
If Item.MessageClass = "IPM.Note" Then
Item.MessageClass = "IPM.Note.NewClass"
Item.Save
End If
End Sub

[1] To get a non-default folder, you need to walk the folder hierarchy
using
the Folders collections or a known folder or use a function that does
that
for you. See http://www.outlookcode.com/d/code/getfolder.htm
Gotcha.Many thanks.
Could you give me the code to do this as I'm not sure how to modify
MAPIFolder.Items.ItemAdd


If you change it in the Inbox but the form is published only to the
other
folder, you'll get an error message if you try to open the item while
it's
still in the Inbox. Better to change the message class at the same time
you
move it into the other folder. You can either write a VBA macro to do
both
operations or use the MAPIFolder.Items.ItemAdd method to detect a new
item
in the target folder and change it then.

Yes, I've understood that from a lot of your previous postings but does
that
mean I have to change the Message Class while the message is still in
the
Inbox?


Message forms are designed to be sent, not posted to folders. You
cannot
make a message form the default form for any folder.

That doesn't mean you can't use a message form. It just can't be the
default
form for a folder. If you want existing messages to use that form,
you'll
need to write code to change the value of the MessageClass property to
use
the "IPM.Note.myform" class.

Sorry to confuse, I was trying to show that I had tried all the
alternatives.
I have created a new folder "aaa" to hold Mail and Post items.
I have created a new form with one additional field and published it
In
Personal Folders as "IPM.Note.myform"
I then go to the folder's properties, select "Forms..." in "When
posting
to
this folder use:-" , located my new form in the dropdown, select
"myform",
click "Open" and I get the message "You cannot create an item of this
type
in this folder".

++++++++++++++++

No restrictions on folder use. Standalone Windows XP computer with
Outlook
2003.
I use Outlook 2003 and wish to do the following:-
Move an incoming email from the Inbox to a folder which I have
created
as
"Post" and then "Note".

Sorry, but you lost me right there. What did you create "as 'Post'
and
then
'Note'."
A new folder to store messages should be created as a folder to hold
mail
and post items.

Use a custom form in this folder to insert additional details into
the
email.

You'll need to change the MessageClass property value on each message
(and
save the message) to make it use the custom form.

I have created new forms as Post and as Message and as Note
message
classes, published it as instructed but still get the
"you cannot create an item of this type in this folder"

What is the exact message class you used to publish the form? Where
did
you
publish it? Is the folder restricted as to the type of forms its items
can
use?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top