corel photopaint script

Hi there,

trying to write a small script for PP X3. But I am not firm with writing vba or scripts.

WITHOBJECT "CorelPHOTOPAINT.Automation.13"
    .SetDocumentInfo 4464, 6878
    .EditClear 8, 1, 0, 0, 0
    .MaskRemove
    name$=.GetDocumentName()   
    .FileSave name$,772,6
 .FileClose()

On trying to process the script I get an error that the hard disk is full or something like that.

I think my script is wrong so I cannot process it correctly.

I would like to save the open file, same name same place, just overwriting it.

Any ideas? Any help would be appreciated.

Thank you very much in advance.

Kind regards,

berthold