Apache OpenOffice (AOO) Bugzilla – Issue 70812
Merge execute method does not release locks
Last modified: 2017-05-20 11:27:36 UTC
I am automating mail merge from Visual Basic 6.0, in a Win XP sp2 environment. In pseudo code I made this: 1. Initialize a data source, save it, register it (OK) 2. Initialize a mail merge service, call its execute method (OK) 3. Revoke data source and dispose it (OK) 4. Dispose merge service (OK??) 5. Cancel the temporary .odb file created at point 1 (Error: permission denied) With OOo 2.0.3 there was another problem: also the QuickStart locks the file (issue 50905). Now I am using 2.0.4: the problem with the QuickStart is fixed (after the program stopped, I can manually delete the files), but I still get an error at point 5 (see above). I have checked the MailMerge service's API, I suppose I have used it correctly. The attachments are: - a .csv file with the data - a .odt template file (I've inserted TextField.Database and FieldMaster.Database to perform a mail merge) - a .vbp Visual Basic Project file (I don't Know if this could be useful..) - a .bas file (the visual basic source file) Before you run the program (I supposed you have an IDE for VB), customize some global variables in it, so they link the needed files (I left my paths in the source code, so you can take them for example): - csvPath --> where you saved the .csv file (path + file name) - templatePath --> where you saved .odt template file (path + file name) - databaseDocument --> where you want the program will save the .odb file (path + file name) - destinationFolder --> where you want the program will save the merged files (a folder's path) - fileDel --> the location of the .odb file to delete (path + file name) A step by step execution in the IDE will show you that everything works, except the line which try to delete the .odb file.
Created attachment 40036 [details] A .csv file containing the record for the mail merge action
Created attachment 40037 [details] A .odt template document, with some merge fields
Created attachment 40038 [details] A source file in VB language that performs mail merge
jsc -> nn: it seems to be one for you
Created attachment 40039 [details] The Visual Basic Project file (Maybe this one is not useful...)
Reset assigne to the default "issues@openoffice.apache.org".