So you're trying to sneak around the limitation against calling Move inside the Close event handler (documented at
http://outlookcode.com/article.aspx?id=59)?
I can't explain why the moved item would be missing data in a custom field. Do you see the same behavior if you move the item manually? What happens if you delete that field from the folder's User-defined Fields and then add it again. (This will not affect any data if you do it at the folder level.)
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54
"koops2121 via OfficeKB.com" u37561@uwe wrote in message news:788e089a9b7f6@uwe...
Function Item_Close()
If MoveQuoted = 1 Then
Set oApp = CreateObject("Outlook.Application")
Set oName = oApp.GetNamespace("MAPI")
Set oFolder = Item.Parent
If oFolder.EntryID =
"000000001A447390AA6611CD9BC800AA002FC45A0300D27A6 408BFB611469494C39DB2EE" &
_
"75A7000000096E430000" Then
Set oFolder = oName.Folders.Item("Public Folders").Folders.Item("All
Public
Folders").Folders.Item("Procurement").Folders.Item ("Calgary")
Set oFolder2 = oName.Folders.Item("Public Folders").Folders.Item("All
Public
Folders").Folders.Item("Procurement").Folders.Item ("Calgary").Folders.
Item("Quoted")
Set oTask = oName.GetItemFromID(Item.EntryID)
oTask.Close(0)
oTask.Move oFolder2
End If
Set oFolder = Nothing
Set oFolder2 = Nothing
Set oName = Nothing
Set oApp = Nothing
End If
End Function
My form is published to each of the public folders. It's published with the
message class "Base", then it gets moved to the next folder as "Quoted".
When copied it appears fine, however none of the user defined fields are
populated. It does however copy stuff like Subject and Due Date. So both in
the listing and viewing the item user defined fields are null.
I checked the "user-defined fields in this folder" and CompanyName is in
there however it appears blank when copied.