?
Solved

Automate Printing from a Bloomberg Terminal

Posted on 2008-10-31
4
Medium Priority
?
3,932 Views
Last Modified: 2013-11-27
Hi,
on our Bloomberg terminal, we have a 'Customized Button' called AUTO PRINT.
I'm not sure if this is a standard Bloomberg feature, or something someone here defined in the past.

We press ALT+B to get to BLoomberg Customized Buttons, then edit the Bloomberg Keys section  to set the print instructions which are multiples lines like this:

TICKER_AND_EXCH_CODE<EQUITY><GO> DVD <GO><TABR><TABR><TABR><TABR>N<GO> D <GO><PRINT> 1 <GO><PRINT>
the only variable being the TICKER_AND_EXCH_CODE

The user then closes the Customized Buttons windows and clicks the AUTO button on the toolbar to run the print job.

I am trying to automate this process from VB

I've had some limited sucess controlling the Bloomberg windows with AppActivate and SendKeys.
But I need help  

Sending ALT+B to access the Customised Buttons windows
I've used SendKeys "%B"  but with no effect.
SendKeys "B" types the letter into the screen, but the % Alt prefix does not appear to do anything

Even if I could access the customised button settings, with SendKeys, there does not seem to be anyway of remotely 'Clicking' a Bloomberg Toolbar object - no keyboard short cut

Is there another method of automating prints from Bloomberg screen that I could use?
Any help will be grateful appreciated
Thanks
0
Comment
Question by:greep
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 22860688
greep,

This may not work at all unless the "Auto" button in Bloomberg has a Hotkey assigend to it.

Is the Bloomberg program Dos based, Windows based, or something else entirely (Terminal Server, Citrix, ...ect)

Since you did not post the code you are using, we are forced to guess..

Your code must:
-Set focus to the bloomberg "Program"
-Wait for the processor (DoEvents)
-Sendkeys Alt-b , but add in the Wait=True argument

Something like this:
    'Your code to activate the Bloomberg Application
    DoEvents
    SendKeys "%B",True
    'You other sendkeys code here
    '...ect

Of course this is air code, but to be sure, you should try adding the Doevents command and the Wait argument of the SendKeys command.

JeffCoachman
   
0
 

Author Comment

by:greep
ID: 22874748
Thanks for replying
As far as I can see there is no keyboard shortcut to the Toolbar buttons, so that route is out.
So instead I've tried tried sending keys directly to the Bloomberg command line.
In the example code below everything seems to work  - except the printing

SendKeys "{PRTSC}", True  - does nothing

Is there another way of getting Bloomberg to Print?

I'm running a Bloomberg Terminal on Windows XP, but I think the terminal program may be DOS based, it's certainl not a standard windows programme
Do Until rs.EOF
	AppActivate "1-BLOOMBERG", True
	Sleep 1000
	SendKeys "ID " & rs!Sedol & "~", True
	Sleep 1000
	DoEvents
	SendKeys "DVD~", True
	Sleep 1000
	DoEvents
	SendKeys "{TAB 4}N~", True
	Sleep 100
	DoEvents
	SendKeys "D~", True
	Sleep 1000
	DoEvents
	SendKeys "{PRTSC}", True
	DoEvents
	SendKeys "1~", True
	Sleep 1000
	DoEvents
	SendKeys "{PRTSC}", True
	Sleep 1000
	DoEvents	
	rs.MoveNext
Loop

Open in new window

0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 22882562
greep,

  "SendKeys "{PRTSC}", True  - does nothing"
It does to something, ...it copies the screen to the windows clipboard.
It does not "Print" directly to the printer

In the "Old Days" the Print Screen key actually sent the screen info directly to the printer.
But that is when most all programs were DOS based.

With the advent of WYSIWYG (What you See Is What You Get), the printscreen key takes a snapshot of the current screen and copies it to the Windows clipboard.
From there you have to pates it into a graphics program in order to "Print" it.

If I were you I would contact Bloomberg directly. Many of these products have an interface that Access VBA can interact with.

Sendkeys is one of the most unreliable and dangerous commands in VBA.
And should only be used for *Simple* tacks, if there is no other way.

JeffCoachman
0
 

Accepted Solution

by:
greep earned 0 total points
ID: 22884418
Thanks for replying
Yes I know that PRTSC copies the screen to the clipboard, but in Bloomberg it is also the quivalent of the <PRINT> command
As it happens I seem to have found a soultion
I've copied the VBSendKey method found here
http://www.wilmott.com/messageview.cfm?catid=10&threadid=35254
sending VK_SNAPSHOT  into the Bloomberg terminal does make it print
0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question