2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

ビューに表示されている順番で選択文書を取得

Last updated at Posted at 2015-05-13

ビューで選択した文書をビューのソート順を保って取得するコード

  • 実処理は省略

ビューのアクションボタン等に作成します。

GetDocument
	Dim ws As New NotesUIWorkspace
	Dim vec As NotesViewEntryCollection
	Dim ve As NotesViewEntry
	Dim dc As NotesDocumentCollection
	Dim doc As NotesDocument
	
	Set dc = ws.CurrentView.Documents	' 選択文書を取得
	Set vec =  ws.CurrentView.View.AllEntries	' ビューの全エントリを取得	
	
	' ビューの先頭から末尾までビューの表示順に順次取得
	Set ve = vec.GetFirstEntry
	Do Until ve Is Nothing
		' 取得したデータが選択文書のリストに含まれるか判定し、含まれる場合のみ処理を行う
		Set doc = dc.GetDocument(ve.Document)
		If Not doc Is Nothing Then
			' ここに処理を記述
		End If
		
		Set ve = vec.GetNextEntry(ve)
	Loop

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?