HealthBerry, a new platform for providing health care professionals with feedback posted on social channels, has announced that 18 NHS hospitals and three GPs have already signed up for the service in the UK. Essentially, the HealthBerry system aggregates feedback left across channels like Facebook and Twitter, as well as more specific ones like Patient Opinion and Care Connect, among others. By getting better feedback, the organizations are better armed with information on which to base potential service changes, or so the theory goes. While it might not be the most glamorous area of tech, new goals within the NHS to improve digital accessibility and to better facilitate the…
Global tablet shipments in Q1 2014 reached 57.6 million units, up 19 percent from 48.3 million in Q1 2013. Breaking those numbers down, Android secured 65.8 percent global share, iOS grabbed 28.4 percent, and Windows secured 5.8 percent. Here’s the full breakdown: The latest figures are from Strategy Analytics, which says Google is making steady progress as it now commands two thirds of the tablet market share. Apple, meanwhile, has changed its product release cycle to the holiday timeframe, so iPad losing share is to be expected until the final months of the calendar year. In short, the Android-iOS war…
Dominic Smith is a senior writer and content strategist for Rackspace Digital, the digital marketing infrastructure specialists. Logos are an essential part of a brand’s identity. A great logo encapsulates the personality and promise of the business behind it. Some of the world’s most ubiquitous logos had humble beginnings. In 1975, Carolyn Davidson was paid $35 to develop the Nike logo and the “Swoosh” we’ve come to recognize has remained more or less intact for nearly forty years. Meanwhile, Pepsi paid the Arnell Group $1 million to develop its updated logo in 2008. There are companies who’ve paid tens of millions…
Previously I didn’t need anything fancy formatting-wise. I could just push some text at a DymoLabels object and print it. I’m not so lucky this time around. I really needed some underlines for visual separation of data. I don’t see any way to underline stuff through the Dymo object model. But what I did discover was that the .label files created by their software are just XML files. Woot!
Rather than trying to navigate a klunky object model, I can just write to a text file. Here’s what the new labels look like.
The XML isn’t terribly pretty mostly because there are line feeds in there. Without the line feeds, I think it would be indented properly. Each Element tag has a String tag and an Attributes tag. It looks like every font attribute is listed whether you specifically set it or not. I’m also padding my text with spaces to line up columns. I could use multiple text boxes, but there is no grid control. For now, this works. The only downside to using one big textbox and space padding is that I have to use a fixed-width font – Courier New in this case. If I want to use a nicer font, I’ll have to go the multiple textbox route.
I have this form for data input and a button to print the label. The button kicks off the code below. I don’t need the mdyLabel variable any more because I’m not using that part of the object model. Instead of mdyLabel, I’m manipulating the XML file directly giving me more control.
Sub PrintBlendCalc()
Dim vaPrinters AsVariant Dim i AsLong Dim sFile AsString
Const sMSGNODYMO AsString = "Dymo label printer not found."
If mdyAddin IsNothingThen
CreateDymoObjects EndIf
IfNot mdyAddin IsNothingThen
vaPrinters = Split(mdyAddin.GetDymoPrinters, "|") For i = LBound(vaPrinters) ToUBound(vaPrinters) If mdyAddin.IsPrinterOnline(vaPrinters(i)) Then
mdyAddin.SelectPrinter vaPrinters(i) ExitFor EndIf Next i
Instead of using the SetField method (like in the previous example), I call a new procedure called UpdateLabel file to create a new XML file. Then I open the file and print it.
PublicSub UpdateLabelFile(ByRef sFile AsString)
Dim xDoc As MSXML2.DOMDocument Dim xStrings As MSXML2.IXMLDOMSelection Dim vaData AsVariant
‘Get the label data in an array
vaData = wshBlendCalc.Range("B2").Resize(7, 5).Value
‘Create a new XML Doc and load the template label Set xDoc = New MSXML2.DOMDocument
xDoc.Load msLABELPATH & "BlendCalc.label"
‘Get all the "String" elements (there are 4) Set xStrings = xDoc.getElementsByTagName("String")
‘Change the text of the four string elements
xStrings(0).Text = FormatLabelText(vaData, 1)
xStrings(1).Text = FormatLabelText(vaData, 2) & FormatLabelText(vaData, 3)
xStrings(2).Text = FormatLabelText(vaData, 4)
xStrings(3).Text = FormatLabelText(vaData, 5) & FormatLabelText(vaData, 6) & FormatLabelText(vaData, 7)
‘Save the XML file
sFile = msLABELPATH & "NewOrders\" & vaData(2, 2) & "_blend.label"
xDoc.Save sFile
‘Save the data to a text file for those people who don’t read XML that well Open msLABELPATH & "NewOrders\" & vaData(2, 2) & "_blend.txt"ForOutputAs #1 Print #1, FormatLabelText(vaData, 1) & _
FormatLabelText(vaData, 2) & _
FormatLabelText(vaData, 3) & _
FormatLabelText(vaData, 4) & _
FormatLabelText(vaData, 5) & _
FormatLabelText(vaData, 6) & _
FormatLabelText(vaData, 7) Close #1
EndSub
There are four elements in my XML file. The first label line is underlined, so that gets its own element. The second and third lines and a portion of the fourth line have the same attributes, so they’re grouped into one element. The portion of the fourth line that is underlined is in the third element. And all the rest of the text goes into the fourth element. The elements are set and the attributes are just the way I want them, so all that is left is to update the text.
I pass the array into a FormatLabelText function which extracts the data I want and pads the spaces so the columns line up. The FormatLabelText function is shown below.
I pass the sFile variable ByRef into UpdateLabelFile. The sFile variable is set and retains that value back in the calling procedure so the calling procedure knows which file to open and print.
The FormatLabelText function takes the array and whichever row we’re interested in formatting. It starts by defining three arrays: vaBuffer defines how much padding for each of the five columns; vaAlignLeft defines if the columns are aligned right or left; and vaFormat defines the number format for each of the five column (@ is the format for general text).
First the data is formatted using the Format function and the vaFormat array. Next, the big If..ElseIf..EndIf block determines how to pad the data with spaces.
If the data is empty (Len = 0) then write spaces for the whole buffer.
If the data length is greater than the buffer, truncate it and add an ellipse to the end.
If the data length is less than the buffer, add spaces to the end (or the beginning if it’s aligned right) to fill it out.
It would be nice (but hard) to create a more general purpose function that created a label from a range. But this works for now.
Microsoft is preparing a bevy of original TV shows to attract new users to its Xbox hardware. The scheme, aptly called Xbox Originals, will launch in June and offer exclusive content on Xbox 360, Xbox One and other Microsoft devices. The company revealed the first of these projects, a TV show based on the first-person shooter Halo franchise, at E3 last year. A documentary about Atari games discarded in a US landfill site was announced in December, followed by sc-fi drama Humans in April. Today though, Microsoft detailed nine other shows currently in development. Every Street United is an eight…