Home Image-Pro Automation (Macros, Apps, Reports)
Options

LEARN THE PATH / FOLDER FOR QUICK SAVE FOR PUBLICATION . . .

2023-03-06-143640

All --

The CODE below will SET the PATH / FOLDER for IMAGE FILES generated by the QUICK SAVE FOR PUBLICATION.
        'SET THE FOLDER FOR THE SAVE A PUBLICATION IMAGE 
        With Application.ApplicationCommands.SetOption(Nothing)
            .Module = "QuickSave"
            .Section = "Publication"
            .Key = "Path"
            .Value = _
                MacroDir & "\" & _
                "REPORT IMAGES" & "\"
            .Run()
        End With

The "problem" with this is that this PATH / FOLDER will be preserved by IP when it shuts down.

I would like to RESET that PATH / FOLDER to the value it had before the SET but the following CODE does not LEARN  the PATH / FOLDER.  To that end, I attempted to LEARN the PATH / FOLDER using this CODE but it does not work.

        'LEARN THE FOLDER FOR THE SAVE A PUBLICATION IMAGE
        Dim MyTempFolderName As String
        With Application.ApplicationCommands.SetOption(Nothing)
            .Module = "QuickSave"
            .Section = "Publication"
            .Key = "Path"
            MyTempFolderName = .Value
            .Run()
        End With

How can I achieve something like this

        'RESET THE FOLDER FOR THE SAVE A PUBLICATION IMAGE 
        With Application.ApplicationCommands.SetOption(nothing)
            .Module = "QuickSave"
            .Section = "Publication"
            .Key = "Path"
            .Value = _
                MyTempFolderName
            .Run()
        End With

to put the PATH / FOLDER for PUBLICATIONS IMAGES back to the value it was when my CODE started so that shutting down IP will not lock in the PATH / FOLDER unique to this APP?

Thanks.

-- Matt

Best Answer

  • Options
    Answer ✓
    Matt, the following macro will report the QuickSave Publication Path

        Public Function GetQuickSaveFolder()
            Dim strDefault As String = ThisApplication.Path(mcPathType.mcptWritableImages)
            Dim MyTempFolderName As String = ThisApplication.Settings("QuickSave","Publication").Get("Path",strDefault)
            MsgBox("Folder: " + MyTempFolderName)
        End Function
    
    Craig.

Answers

  • Options
    Also, I was told that the QuickSaveForPublication Command has a FileName property which you can set to specify where the saved image will go.  This would avoid having to change the Setting at all.
Sign In or Register to comment.