Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community

At 08 JAN 2004 09:06:27AM John Bouley wrote:

Happy New Year!

I noticed this issue was brought up over 1 year ago with no resolution. Is this something that has been fixed or is there a workaround.

Problem: When user changes the "Default Printer" using the Utility("PRINTSETUP") command. The report is printed to the old default printer.

This appears to be a result of a problem with OIPI32 and MDI Frames?

Anyone else experience this symptom and is there a workaround?

Thanks,

John


At 08 JAN 2004 04:10PM Bob Orsini wrote:

OI Utility function for printsetup does not change the default printer in windows. It only changes the printer for OI. The ocx for OIPI uses the default printer in Windows and not the OI printer.


At 16 JAN 2004 04:21PM John Bouley wrote:

Thanks Bob,

Ok, so how do I get the "new" OI printer in OIPI?

This technique used to work in the 16 bit but no longer in the 32?

Thanks,

John


At 16 JAN 2004 04:37PM Bob Carten wrote:

John -

Vbscript is a nice way to do this.

you can save scripts to a .vbs file and use utility runwin to execute them, or you can embed the windows scripting host as an OLE control in a form an execute the script via that control.

see this link about Printer Logon Scripts

The author has an example of:

' VBScript.

' Guy Thomas January 2004

Dim net

Set net=CreateObject("WScript.Network")

net.SetDefaultPrinter "\\ServerName\PrinterName"

'——–

HTH

The other Bob

At 21 JAN 2004 03:15PM John Bouley wrote:

Thanks Bob and Bob,

Here is what I found and it seems to work all the time!

I found a Works supplied function "printsetup" that allows you to simulate the Utility("PRINTSETUP")

Previously, in OI 3.7.5 when Utility("PRINTSETUP") was called it would open a OI window that would allow the user to set the Default Printer. As a result of the upgrade to 4.x this was replaced by the Windows Printer Dialog. However, I found that this does not change the default Windows printer. I could not find how to access the printer once someone changed from the default.

Therefore, I changed

Result=Utility("PRINTSETUP")

to

Result=printsetup(1)

Thanks,

John Bouley

View this thread on the Works forum...

  • third_party_content/community/commentary/forums_works/3c05e62585eab0c285256e15004d7ec6.txt
  • Last modified: 2023/12/30 11:57
  • by 127.0.0.1