Hallo Leute,
wie muss ich folgendes Script ändern das ich aus der Ansicht nur die markierten Felder nach Excel exportiere und NICHT ALLES.
Sub Initialize
On Error Goto errSub
Dim ses As NotesUIworkspace
Dim vw As NotesView
Dim dc As NotesDocumentCollection
Dim doc As NotesDocument
Set ses = New NotesUIWorkspace
Set vw = ses.currentview.view
Dim xlApp As Variant
Dim xlSheet As Variant
Set xlApp = CreateObject("Excel.application")
xlApp.StatusBar = "WorkSheet wird erstellt. Bitte warten..."
xlApp.Visible = True
xlApp.Workbooks.Add
xlApp.ReferenceStyle = 2
Set xlSheet = xlApp.Workbooks(1).Worksheets(1)
xlsheet.Name = "Excel Druckvorlage"
i=1
ia=1
Forall c In vw.Columns
If Trim(c.Title)<>"" Then
xlSheet.Cells(1, ia).Value = c.Title
ia=ia+1
End If
i=i+1
End Forall
ii=2
Set doc = vw.GetFirstDocument
While Not(doc Is Nothing)
i=0
ia=0
Forall c In vw.Columns
If Trim(c.Title)<>"" Then
xlSheet.Cells(ii, ia+1).Value = doc.ColumnValues( i )
ia=ia+1
End If
i=i+1
End Forall
ii=ii+1
Set doc = collection.GetNextDocument(doc)
Wend
On Error Resume Next
xlSheet.Cells.Select
xlApp.Selection.Columns.AutoFit
xlSheet.Rows("1:1").Select
xlApp.Selection.Font.Bold = True
exitsub:
On Error Resume Next
xlApp.StatusBar = ""
xlApp.Visible = True
Exit Sub
errsub:
Print Error & "/" & Erl
Resume exitsub
End Sub