> Both the source and
> destination folders have the same forms published to them
> and the same default forms (ipm.contact).
You should not have a form published in two places. This will really
confuse the cache system. If you need it in two folders, then publish
it to a forms library.
You need to learn how to walk the folders. You need to set a NameSpace
object from the Application object, then set a folder object from the
name of your pst. From there you walk the folder hierarchy, setting
folder objects as you go. (Actually, you only need two folder objects,
for the current one, and the next one down.) Then you would move the
selected object to the that folder. Finally, you open the new object,
change the messageclass field to the name of your custom form, and save
it.
Hollis D. Paul [MVP - Outlook]
Hollis@outhousebythesound.com
Using Virtual Access 4.52 build 277 (32-bit), Windows 2000 build 2195
http://search.support.microsoft.com/kb/c.asp?FR=0&SD=TECH&LN=EN-US
Mukilteo, WA USA
I am able to get the folders the object resides in, I use
Application.ActiveExplorer.Selection(i) since it is
selected when this code fires. The destination folder is
the contact folder so I get that one with
oOl.Session.GetDefaultFolder(olFolderContacts).
The problem is that once I have these folders I call the
move method it is not working properly. The post gets
moved to the deleted folder, yet if I call this same code
with other itesm (e.g., custom contact forms) it works
fine.
Jack
>-----Original Message-----
>> Both the source and
[quoted text clipped - 22 lines]
>
>.
Hollis D. Paul - 18 Jan 2004 16:51 GMT
> The problem is that once I have these folders I call the
> move method it is not working properly. The post gets
> moved to the deleted folder, yet if I call this same code
> with other itesm (e.g., custom contact forms) it works
> fine.
A move involves a copy to the desired folder and a deletion in the
original folder. You should see a copy appear in the target folder as
well as in the deleted items folder. Check the number of items in
folder before you try the operation. It is likely that it is getting
there, but you aren't seeing it because you are looking for the custom
form item.
Hollis D. Paul [MVP - Outlook]
Hollis@outhousebythesound.com
Using Virtual Access 4.52 build 277 (32-bit), Windows 2000 build 2195
http://search.support.microsoft.com/kb/c.asp?FR=0&SD=TECH&LN=EN-US
Mukilteo, WA USA
OK, so now I see the additional item in the destiniation
folder, however, it is not a post, it is a contact (the
folder's default form) with the post as an attachment.
Is there a way to simply move the item and have it show
you as the original item (custom Post) in the destiniation
folder?
Jack
>-----Original Message-----
>> The problem is that once I have these folders I call the
[quoted text clipped - 18 lines]
>
>.
Hollis D. Paul - 18 Jan 2004 23:33 GMT
> Is there a way to simply move the item and have it show
> you as the original item (custom Post) in the destiniation
> folder?
Did you reset the messageclass field of the item? The whole business
about which icon is showing is one I have ignored. So I can't really
help you on this detail. But one if the reasons it doesn't show right
is that the icon isn't in the directory in which it is looking. So you
should check, in the item's properties, to see where it thinks the icon
image is to be found.
Hollis D. Paul [MVP - Outlook]
Hollis@outhousebythesound.com
Using Virtual Access 4.52 build 277 (32-bit), Windows 2000 build 2195
http://search.support.microsoft.com/kb/c.asp?FR=0&SD=TECH&LN=EN-US
Mukilteo, WA USA
I inspected the message class in debug mode ans it is the
correct messageclass. However, if I open the item after
moving it, its messageclass is that of the default form in
the folder.
Are there special considerations in moving post items
amoung folders?
>-----Original Message-----
>> Is there a way to simply move the item and have it show
[quoted text clipped - 16 lines]
>
>.
Hollis D. Paul - 19 Jan 2004 16:45 GMT
> Are there special considerations in moving post items
> amoung folders?
Well, I suppose there are. When you use the AddItem method to a folder
objects Items collection set, you can specify which form to use. The
code you are using does not specify a form to use. You are assuming
that the process is one of copying the original item byte by byte. But
this is not the way it is done. The new item is created as an empty,
blank form, and field values are copied from one to another.
Unfortunately, the MessageClass field is not one that is copied, as the
new item was created with the default form name. So you have to
experiment with it. You might try adding a custom action to your form,
so that you can use the autoloading function of fields, rather than
using the Move method.
Hollis D. Paul [MVP - Outlook]
Hollis@outhousebythesound.com
Using Virtual Access 4.52 build 277 (32-bit), Windows 2000 build 2195
http://search.support.microsoft.com/kb/c.asp?FR=0&SD=TECH&LN=EN-US
Mukilteo, WA USA