O
Sub Click(Source As Button)
Dim ws As New NotesUIWorkspace
Dim filename As Variant
filename = ws.OpenFileDialog( True, "Выберите файл(ы)")
Forall f In filename
Print f
End Forall
End Sub
Dim workspace As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Set uidoc = workspace.CurrentDocument
Call uidoc.GotoField("Scan")
Call uidoc.Import
Dim ws As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim rtitem As NotesRichTextItem
Dim object As NotesEmbeddedObject
Dim doc As NotesDocument
Dim filename As Variant
Set uidoc = ws.CurrentDocument
filename = ws.OpenFileDialog( True, "Выберите файл(ы)")
If folename = "" Then
Exit Sub
End If
Call uidoc.GotoField("Scan")
Forall i In filename
Call uidoc.Import("JPEG Image", i)
End Forall
Set doc = uidoc.Document
Set rtitem = New NotesRichTextItem( doc, "Atach" )
Forall j In filename
Set object = rtitem.EmbedObject( EMBED_ATTACHMENT, "", j, Бекап)
End Forall
OpenFileDialog method
.....
Syntax
stringArray = notesUIWorkspace.OpenFileDialog( multipleSelection , [title$] , [filters$] , [initialDirectory$] , [initialFile$] )
.......
initialDirectory$
String. Optional. The directory to which the dialog box is opened. Otherwise, determined by the system.
Dim ws As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim rtitem As NotesRichTextItem
Dim object As NotesEmbeddedObject
Dim doc As NotesDocument
Dim filename As Variant
Dim session As New NotesSession
Dim c As Variant
Dim docprofile As NotesDocument
Set db = session.CurrentDatabase
Set docprofile = db.GetProfileDocument("path", session.UserName)
If docprofile.IsNewNote Then
c(0) = "Y:\Scan\Archive\"
Else
c = docprofile.GetItemValue("path")
End If
filename = ws.OpenFileDialog( True, "Выберите файл(ы)",, Cstr(c(0)))
Set uidoc = ws.CurrentDocument
Call uidoc.GotoField("Scan")
Forall i In filename
Call uidoc.Import("JPEG Image", i)
End Forall
Set doc = uidoc.Document
Set rtitem = New NotesRichTextItem( doc, "Atach" )
Forall j In filename
Set object = rtitem.EmbedObject( EMBED_ATTACHMENT, "", j, Бекап)
End Forall
If docprofile.isnewnote Then
Set rtitem = docprofile.CreateRichTextItem( "path" )
Call docprofile.ReplaceItemValue("path", Strleftback(Cstr(filename(0)), Right(Cstr(filename(0)),26)))
Call docprofile.Save(True,False)
Else
Call docprofile.ReplaceItemValue("path", Strleftback(Cstr(filename(0)), Right(Cstr(filename(0)),26)))
Call docprofile.Save(True,False)
End If
Формы может и не иметь, во вьюхе его не отобразишь (и это правильно!). В 4-ке профиля вообще были элементами дизайна.Профильный документ не есть простым документом, на это наталкивает IsProfile property. Не понят но по какой форме создаётся этот док и как его потом отобразить во вьюхе.
Взломай свой первый сервер и прокачай скилл — Начни игру на HackerLab