Ask Your Question

IO exception performing storeAsUrlin Basic (Solved)

asked 2017-03-11 00:18:09 +0200

Pansmanser gravatar image

updated 2017-03-11 16:42:24 +0200

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
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

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2017-03-11 16:41:38 +0200

Pansmanser gravatar image

Thanks to a tip from Rudolfo at , 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!

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2017-03-11 00:18:09 +0200

Seen: 61 times

Last updated: Mar 11 '17