I need to create a scheduled task that will open an excel file
Qry Bloomberg and then email the results. The computer is in my office but not part of the network. Is there a way to send emails with out outlook ?
If you can think of a better process I would also be interested. The bloomberg qry is for Fx Rates. Oh if you know of another way to get fx rates that would be even better
It looks like there are a few different (but seemingly similar) methods available in the Bloomberg API to retrieve the data. There are bound to be caveats that I'm not aware of, but this works for me:
'reference to the bloomberg data type library required
Const strFIELD As String = "PX_LAST"
Dim objBBG As BLP_DATA_CTRLLib.BlpData
Dim vResults, vCurrencies
vCurrencies = Array("USDCHF Curncy", "AUDUSD Curncy", "GBPUSD Curncy")
Set objBBG = New BLP_DATA_CTRLLib.BlpData
objBBG.AutoRelease = False
vResults = objBBG.BLPGetHistoricalData(security:=vCurrencies, _
StartDate:=VBA.Date - 1, _
EndDate:=VBA.Date - 1)
'what did we find?
Stop 'have a look at vResults in the locals window
Set objBBG = Nothing
For reasons *unknown*, one of the other calls might be better.