Issue 70812

Summary: Merge execute method does not release locks
Product: App Dev Reporter: ludbia <metlud>
Component: apiAssignee: AOO issues mailing list <issues>
Status: UNCONFIRMED --- QA Contact:
Severity: Trivial    
Priority: P3 CC: issues
Version: 3.3.0 or older (OOo)   
Target Milestone: ---   
Hardware: All   
OS: Windows XP   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Attachments:
Description Flags
A .csv file containing the record for the mail merge action
none
A .odt template document, with some merge fields
none
A source file in VB language that performs mail merge
none
The Visual Basic Project file (Maybe this one is not useful...) none

Description ludbia 2006-10-24 16:45:41 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.
Comment 1 ludbia 2006-10-24 16:48:34 UTC
Created attachment 40036 [details]
A .csv file containing the record for the mail merge action
Comment 2 ludbia 2006-10-24 16:50:32 UTC
Created attachment 40037 [details]
A .odt template document, with some merge fields
Comment 3 ludbia 2006-10-24 16:52:32 UTC
Created attachment 40038 [details]
A source file in VB language that performs mail merge
Comment 4 jsc 2006-10-24 16:53:58 UTC
jsc -> nn: it seems to be one for you
Comment 5 ludbia 2006-10-24 17:07:22 UTC
Created attachment 40039 [details]
The Visual Basic Project file (Maybe this one is not useful...)
Comment 6 Marcus 2017-05-20 11:27:36 UTC
Reset assigne to the default "issues@openoffice.apache.org".