Hello,
I have been trouble-shooting an issue and am wondering if any of you have run across it or see an issue with my code.
The script exports approximately 400 documents to a local drive correctly on the first run thru but subsequent run thrus have 0 page documents. The number of 0 page documents increases on each subsequent run thru.
Here is my code:
Imports System Imports System.Collections.Generic Imports System.ComponentModel Imports System.Data Imports System.Data.SqlClient Imports System.Text Imports Laserfiche.RepositoryAccess Imports Laserfiche.DocumentServices Imports System.IO Namespace WorkflowActivity.Scripting.SDKScript Public Class Script1 Inherits RAScriptClass92 Protected Overrides Sub Execute() Dim MySession As Session = me.RASession Dim MyDocument As Laserfiche.RepositoryAccess.DocumentInfo Dim ExportDoc As New DocumentExporter Dim EntryID as Integer = me.BoundEntryId MyDocument = Document.GetDocumentInfo(EntryID,MySession) Dim FileName as String = GetTokenValue ("Entry Name") Dim FilePath as String = GetTokenValue ("Path") Try ExportDoc.PageFormat = DocumentPageFormat.Tiff ExportDoc.IncludeAnnotations = True ExportDoc.BlackoutRedactions = True ExportDoc.ExportPages(MyDocument, MyDocument.AllPages, FilePath & "\" & FileName & ".tif") Catch ex As Exception MsgBox(ex.ToString) End Try MyDocument.Dispose End Sub End Class End Namespace
I apreciate any help!!!
Thanks!
Terri