OK, I have a solution to the Style parts of the question.
For paragraph style a trap might look like this:
If Not oFrame.StyleFamilies.getByName("ParagraphStyles").hasByName("FaxDiary") Then
MsgBox "Paragraph style 'FaxDiary' is not present. Exiting" : Exit Sub
Endif
And likewise for page style:
If Not oFrame.StyleFamilies.getByName("PageStyles").hasByName("FaxDiary") Then
MsgBox "Page style 'FaxDiary' is not present. Exiting" : Exit Sub
Endif
I also have a solution to the font question, based on Andrew Pitonyak’s OOME listing 299. It seems relatively cumbersome, and I wonder if one cannot access the font list directly. Or even access the Frame (already defined and used above).
oFonts() = ThisComponent.getCurrentController().getFrame.getContainerWindow().getFontDescriptors()
Moon = False
For i = LBound(oFonts()) To UBound(oFonts())
If oFonts(i).Name = "Moon Phases" Then Moon = True
Next
If Not Moon Then MsgBox "Font 'Moon Phases' is not present. Exiting." : Exit Sub