Community

Script won't export

Hello all,

I'm trying to export an image to a folder, i used the same sample script provided in the sample scripts page. 

Once i run the code, and try to export the document, i get nothing on the folder i selected. 

Is there anything else i should consider before exporting a file besides the script itself? 

Here is my code: 

dim fso, folderName

set fso = CreateObject("Scripting.FileSystemObject")

folderName = "C:\Export\Abbyy_Export"

if Not fso.FolderExists( folderName ) then

    fso.CreateFolder folderName

end if

dim imageOptions

set imageOptions = FCTools.NewImageSavingOptions

imageOptions.Format = "PDF"

imageOptions.ColorType = "BlackAndWhite"

imageOptions.Resolution = 600

dim i

for i = 0 to me.Pages.Count - 1

    if Not IsNull(me.FIELD("Seccion1\NombreExportar").Value) then

        field2Value = me.Field("Seccion1\NombreExportar").Value

    end if

    ' Sets the desired name and extension for the file depending on the selected format

    fileName = fso.BuildPath( folderName, ".PDF")

    me.Pages.Item(i).SaveAs fileName, imageOptions

next

 

 

 

Was this article helpful?

0 out of 0 found this helpful

Comments

1 comment

  • Avatar
    Permanently deleted user

    Hello,

     You should make sure that the target folder has all required access permissions

    0

Please sign in to leave a comment.