Switch OptionSet in VBa

About the programming interface for the virtual PDF printer driver.

Moderator: jr

Switch OptionSet in VBa

Postby Herrie » Wed Apr 15, 2015 9:20 pm

A double question

a: does it make sense to programmatically switch OptionSet ini ?
Example: before printing from vba (Excel)
set a specific OptionSet file
After finishing the job,
set the 'original' OptionSet file

would the code below be the best solution??

[code]
Part from an existing sub routine..

oPdfSettings.LoadSettingsFile (sLocation & "Theeketel Option Set.ini")
If oPdfSettings.getvalue("optionsetname") <> "" Then 'this is a name I wrote in the ini file myself, but it is not stable
fp = oPdfSettings.getvalue("optionsetname")
Else
fp = oPdfSettings.getvalue("author")
End If
'test it
Debug.Print fp

'loadBasic Option Set.ini
oPdfSettings.LoadSettingsFile (sLocation & "Basic Option Set.ini")
If oPdfSettings.getvalue("optionsetname") <> "" Then
fp = oPdfSettings.getvalue("optionsetname")
Else
fp = oPdfSettings.getvalue("author")
End If
'test it
Debug.Print fp

End Sub
[/code]

Any suggestions?
Herrie
 
Posts: 4
Joined: Thu Feb 26, 2015 6:48 pm

Return to Programming

Who is online

Users browsing this forum: No registered users and 2 guests

cron