IO exception performing storeAsUrl in Basic (Solved)

The following code snippet was working ok. The full routine reads a form, fills in the blanks, and does a “Save As”. However, when I modified the routine to add a .png to the form, the storeAsUrl began to generate an exception.
I suspect the problem is the filter, and I have tried various, but without success. If it makes any difference, the code resides in a base file, but generates a writer document obviously.
Any suggestions, please?

image description

oDoc = StarDesktop.LoadComponentFromUrl(ConvertToURL(sFileName), "_blank", 0, Args())
...
sFileName = sPath & "HSFReport_" & sClient & "_" & sScaleNo & ".odt"
Dim oArgs(1) As New com.sun.star.beans.PropertyValue
oArgs(0).Name = "FilterName"
oArgs(0).Value = "StarOffice XML (Writer)"
oArgs(1).Name = "Overwrite"
oArgs(1).Value = true
oDoc.StoreAsURL(ConvertToURL(sFileName), oArgs)

Ubuntu 16.04
LO 5.1.6.2

Thanks to a tip from Rudolfo at [Solved] What is the filtername to open a text document ? (View topic) • Apache OpenOffice Community Forum , I have the answer to this question. The correct filter is “writer8”. However Rudolfo’s answer was of much wider interest. He suggested using the macro recorder to find out the answer. Brilliant, thanks!