Hacker News new | ask | show | jobs
by gomoboo 100 days ago
How do you check style via PowerShell? You’ve pulled me in.
1 comments

As in how to interact with office docs programmatically? It's in the second text blurb, you can make a new COM object. For example new Excel Workbook:

  $excel = New-Object -ComObject excel.application
From there you have full access to all parts of the document as properties & can call whatever methods are available to edit the document.

As for how we enforce style guide on a presentation, each slide runs through a workflow checking the various style-guide rules that we have / corporate has

- Ensure correct template is used

- Set and enforce correct font

- Check text boxes for font size to check verbosity / readability

- Flag / remove animations (not accessible)

- Flag images without alt-text

and so on

for a 300 slide new release presentation, it takes about 45 seconds for the script to process and auto-fixes what makes sense to auto-fix (e.g., wrong fonts) and adds comments / generates report on what needs to be reviewed and adjusted