Using Andrew’s code as below I get this error
BASIC runtime error.
An exception occurred
Type: com.sun.star.lang.IllegalArgumentException
Message: cannot coerce argument type during corereflection call:
arg no.: 1 expected: “[]com.sun.star.beans.PropertyValue” actual: “void”.
Can anyone explain the error please and what I need to correct?
Dim oProp(0) As New com.sun.star.beans.PropertyValue
Dim sUrl As String
sUrl = "file:///<complete/path/To/New/document>"
REM Set this to True if you want to overwrite the document.
oProp(0).Name = "Overwrite"
oProp(0).Value = True
oDoc.storeAsURL(sUrl, oProp())