Is there any way of running a macro through webfocus code when generating reports in excel format? I have created a .mht file which includes a statement to directly print the report output: "ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True" and this .mht file is referred to in my ON TABLE PCHOLD statement. But the result is: when i run my report, i do get the output in excel format and then when i go to Tools->Macro->Macros and then run the macro(the macro does appear), the output is getting printed. Is there any way such that when my excel output gets generated, at the same time, the macro is run ?This message has been edited. Last edited by: Kerry,
Yes, this is something similar to what I want. The .mht should auto-run the macro when the report opens in Excel so that it automatically gives the print out and doesnt even bring up the print dialogue window.
Actually I am doing something like this right now. I saved a .mht in baseapp on the Reporting Server. I wrote a macro to do some formatting, turning filters on, freeze panes, etc. Just name the macro Auto_Open. Seems to work fine.
In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
Posts: 950 | Location: Oklahoma City | Registered: October 27, 2006
Is there a setting within Excel which automatically sets the column width to a minimum based on the contents, similar to double-clicking the column dividers? Something other then an macro which is close to automatic but not directly automatic unless we do some work and implement that on the users machines. Having the users change a setting within Excel is acceptable. OK, maybe a macro which we can, through WebFOCUS PCHOLD, automatically execute.
Posts: 3066 | Location: Middle Tennessee [8204M Gen48 in Test&Prod] | Registered: February 23, 2005