Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Running Macros on click of Hyperlink in EXCEL

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Running Macros on click of Hyperlink in EXCEL
 Login/Join
 
Gold member
posted
Hi,

I have a report with Excel output where I wish to have a "PRINT" link in header. When I click on this Link a Macro should run which overwrites the default Printer Properties with the ones specified in this Macro.

Is this possible? And how this can be achieved using WF code.

Regards
CD
 
Posts: 78 | Registered: December 11, 2005Report This Post
Master
posted Hide Post
If you are in Excel 2002 or higher. Create a workbook with at least 2 sheets. Save it as an .mht. Put your macro in the workbook. Copy to .mht file to the Reporting Server (I put them in the baseapp folder). Run your fex with "ON TABLE HOLD FORMAT EXL2K TEMPLATE 'templatename' SHEETNUMBER 1".

When the report displays, the user can run the macro using a hotkey (i.e. Alt-P) or click on your link in the heading. Sorry, but I have not tried putting a Run Macro Command a heading, but I bet it can be done.


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
 
Posts: 975 | Location: Oklahoma City | Registered: October 27, 2006Report This Post
Gold member
posted Hide Post
Thx for the reply,

But my doubt is how will the EXCEL come to know it has to run the Macro on the click of that Link. Hence what should be the coding for that link (some FOCEXEC etc) so that the Link gets associated with the Macro code??
 
Posts: 78 | Registered: December 11, 2005Report This Post
Expert
posted Hide Post
CD,

I would be inclined to place the button in the web archive in readinesss for the data to be loaded. Unless the fact is that you want the drill down links to be the "buttons"?
If the case is the latter (as I suspect) then I am not sure that you can do it as WF (to my knowledge) cannot pass VBA code into the Excel worksheet.

What is that you are attempting to get the macro to achieve? Parse the data into ranges etc.?

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
<JG>
posted
The easiest way to do what you want is to insert an image and assign a macro to the image.
For the method, a lot depends on what release of WebFocus you are running.
71+ use a template,for previous releases look at my article on macros pre 71.

In excel one of the options for an image (or word art) if you right click on it, is to assign a macro.
If it's a single page that you want to print then just use my example for assigning the range and add
the print commands.
If it's multiple pages then you need to play around a little.

Using word art to create the macro link is probabley the best solution as an image does not need to be available
to the excel document.

This message has been edited. Last edited by: <JG>,
 
Report This Post
Guru
posted Hide Post
JG,

Do you have a link to this article?


Glenda

In FOCUS Since 1990
Production 8.2 Windows
 
Posts: 301 | Location: Galveston, Texas | Registered: July 07, 2004Report This Post
<JG>
posted
 
Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Running Macros on click of Hyperlink in EXCEL

Copyright © 1996-2020 Information Builders