2015-10-13 182 views
0

將郵件放入文件夾時,它會自動添加到$草稿箱或$發送。

objdoc = m_objNotesDBDst.CreateDocument();           
objth.t_CurrentDoc.CopyAllItems(objdoc, true);  
objdoc.Save(true, false, true); 
objdoc.PutInFolder(objth.t_PutInFolder, true); 
+0

objdoc.PutInFo lder連續( 「$回收站」);沒有被添加到垃圾文件夾中爲什麼 –

回答

2

$草稿$發送沒有文件夾,他們的意見。

On the surface, views and folders look the same. Both display documents vertically in rows, and for each row there are columns which show information about the document. For example, your Inbox (which is a folder) and All Documents (which is a view) both show emails, and the columns for each row display values such as the name of the Sender, the date, the size, and the subject.

Where a Folder and View differ, is in how they determine which documents to display.

Each view in a database, such as your mailbox, is pre-configured by a developer to show documents based on something called a "Selection Formula". That formula can range from something as simple as "All", so that every document in a database is shown, to a very granular formula such as "Show me all documents by a specific author, and are older than a specific date, and over a specific size".

Folders on the other hand are more of an "open container" for documents. Instead of displaying documents based on any specific criteria, they display just those documents that you drag and drop into them, or redirect from your Inbox using Mail Rules. Folders tend to be more personal, and allow you to define your own way to store documents, organized in a manner which has meaning specific to you.

Examples of views in your mailbox: All Documents, Sent, Drafts

Examples of folders in your mailbox: Inbox, 5 Weeks, Junk, trash, all folders that you created to file your messages (they appear under the label "Folders")

原創文章,你可以在這裏找到:What is the difference between a View and a Folder in Lotus Notes?

爲了檢查什麼是文件夾,什麼是查看您需要在設計器中打開數據庫。

enter image description here

2

您的代碼對當前文檔的副本,所有項目,並把它放到一個文件夾。

如果您當前的文檔是已發送的郵件,則您的副本也將成爲已發送的郵件,並出現在視圖$已發送,因爲它包含當前文檔中的所有項目。 $發送的選擇公式是

SELECT DeliveredDate = "" & PostedDate != "" & !(@IsMember("S"; ExcludeFromView)) 

如果您不希望出現在再送到視圖$複印文檔添加這行代碼之後CopyAllItems行:

objdoc.replaceItemValue("ExcludeFromView"; "S"); 

如果當前文檔是一個然後您的副本也將成爲草稿,並出現在視圖$草稿,因爲它包含當前文檔中的所有項目。 $草稿的選擇公式是

SELECT PostedDate = "" & $MessageType = "" & @IsNotMember("D" : "A"; ExcludeFromView) & 
ISMAILSTATIONERY != 1 & Form != "Group" & Form != "Person" 

如果您不希望出現在視圖$草稿複印文檔再經過CopyAllItems行添加這行代碼:

objdoc.replaceItemValue("ExcludeFromView"; "D"); 

如果您只是想將當前文檔放入文件夾而不創建副本,然後將您的代碼更改爲以下一行:

objth.t_CurrentDoc.PutInFolder(objth.t_PutInFolder, true); 
+0

爲什麼我得到注意錯誤:收集很忙 –

+0

注意錯誤:找不到索引條目 –

+0

:注意錯誤:無法寫入或創建文件(文件或磁盤是隻讀) –

相關問題