3.7.2 Alt-text embedding

Over the years OLE technology became increasingly outdated (still uses 16-bit Windows metafiles) and is not perfectly supported by Sharepoint and other modern Office tools. In addition, of course, it was never supported on Linux or on the Mac, whereas Msc-generator now has a GUI for both.

Therefore a new way to add charts to Office documents has been developed in v8.0, called alt-text embedding. In this method the chart is inserted as a PNG image, where the alt-text (a.k.a. alternative text, usually used for accessibility or when the graphics cannot be shown) stores the chart text, language and other info. This method of embedding requires no special OS support, like OLE and also allows to apply various properties to the chart, such as cropping, outline, shadow, rotation, etc. Alt-text embedding is not compatible with OLE embedding in any which way.

The CLI GUI of Msc-generator (msc-gen --gui) can now work with alt-text embedding the following ways.5

  1. Open a PPT file (with pptx extension) and simultaneously edit all the charts embedded in it. It is possible to copy snippets between the charts, but also to add a new one. Note that you cannot save the PPT file, if it is opened in PowerPoint, as PowerPoint locks the file for writing. Also, PPT files on Sharepoint drives may not merge well, when edited this way.
  2. Copy the currently edited chart to the clipboard packaged with its chart text, language and other info. You can then paste it into PowerPoint or Word documents.
  3. If you pasted an Msc-generator chart into a into PowerPoint or Word document and later copy it to the clipboard from PowerPoint or Word, you can paste it into Msc-generator for editing. Msc-generator stores the sizing and formatting of the chart (along with other graphical elements copied with the chart) so when you save, those will be preserved. Saving will happen to the clipboard from where you can re-insert the chart back to the PowerPoint or Word document (or to another one). If a slide contains multiple charts, you can copy all of them to the clipboard and edit all of them simultaneously in Msc-generator (potentially copying sinppets between them).
  4. Finally, Msc-generator can copy the alt-text for the current chart to the clipboard. Adding this to any graphics in PowerPoint will upgrade the graphics to an Msc-generator chart and Msc-generator will be able to edit it (either by opening the PPT file as #1 above or via the clipboard). Similarly, if you copy an alt-text to the clipboard, Msc-generator can paste it as if the whole chart has been copied.

Turning the setting Auto Paste Clipboard on, will make Msc-generator automatically open any chart copied to the clipboard (and come to the foreground) if the currently open chart has no unsaved changes.

See Embedding Charts on how to use the command-line tool to embed and extract charts into and from PNG and PPT files.

Best common practice workflow You start editing the chart in Msc-generator. At some point select File|Copy to Clipboard and then simply paste into a PowerPoint or Word document. (Turn Auto Paste Clipboard on.) Then any time later (with Msc-generator running), 1) cut the chart (and maybe other graphics elements or multiple charts) to the cliboard; 2) Msc-generator pops up automatically ; 3) edit the chart; 4) Save; and 5) Paste the chart(s) (and other elements) back to the PowerPoint or Word document.


Footnotes

(5)

The MFC GUI (Msc-generator.exe) does not support alt-text embedding and continues to support OLE embedding.