| View previous topic :: View next topic |
| Author |
Message |
Nicki Newbie

Joined: 26 Dec 2005 Posts: 4
|
Posted: Fri Apr 28, 2006 7:39 am Post subject: Close OO after submitting |
|
|
My system allows complete ODT forms via internet. However after user clicked Submit button
it goes to save php file and stayed opened on this file.
I have no other way except showing stupid text on that Save php file that form is completed please close this Document.
Is it possible to close automatically Open Office after submission completed?
Thanks in advance. |
|
| Back to top |
|
 |
probe1 Moderator


Joined: 18 Aug 2004 Posts: 2465 Location: Chonburi Thailand Asia
|
Posted: Fri Apr 28, 2006 8:11 am Post subject: |
|
|
do
| Code: |
oDoc.Close( FALSE )
|
Does this help? _________________ Cheers
Winfried
My Macros
DateTime2 extension: insert date, time or timestamp, formatted to your needs |
|
| Back to top |
|
 |
Nicki Newbie

Joined: 26 Dec 2005 Posts: 4
|
Posted: Fri Apr 28, 2006 9:41 am Post subject: |
|
|
Thank you.
I know about close method. However in my case it doesnt help.
| Code: |
Sub Main
oDocument = ThisComponent
oForm = oDocument.Drawpage.Forms(0)
oControl = oForm.getByName("strUrlEnd")
Dim vEnum
Dim vVal
Dim s1$
Dim sHint$, sContent$
vEnum = thisComponent.getTextFields().createEnumeration()
If Not IsNull(vEnum) Then
Do While vEnum.hasMoreElements()
vVal = vEnum.nextElement()
If vVal.supportsService("com.sun.star.text.TextField.Input") Then
sHint=vVal.getPropertyValue("Hint")
sContent=vVal.getPropertyValue("Content")
If Trim(sContent) <> "" Then
s1=s1 & "pair_beg|af_nam:" & sHint & "af_val: " & sContent & "|pair_end"
End If
End If
Loop
End If
oControl.text = oControl.text & s1
PushButton = oForm.getByName("PushButton")
PushButton.setPropertyValue("ButtonType", 1)
DocCrl = oDocument.getCurrentController()
CtlView = DocCrl.GetControl(PushButton)
oDocument.store()
CtlView.submit()
End Sub
|
If I place close before CtlView.submit() it closes OO and submission doesnt take place.
If i place it after it doesnt close because OO already works with save file.
So I think i have no any ways to close OO after submission.
Thanks anyway. |
|
| Back to top |
|
 |
probe1 Moderator


Joined: 18 Aug 2004 Posts: 2465 Location: Chonburi Thailand Asia
|
Posted: Fri Apr 28, 2006 2:21 pm Post subject: |
|
|
have a look at the .StoreToURL function, this should fit your situation in combination with .Close()
HTH _________________ Cheers
Winfried
My Macros
DateTime2 extension: insert date, time or timestamp, formatted to your needs |
|
| Back to top |
|
 |
Nicki Newbie

Joined: 26 Dec 2005 Posts: 4
|
Posted: Sun Apr 30, 2006 12:15 pm Post subject: |
|
|
| probe1 wrote: | have a look at the .StoreToURL function, this should fit your situation in combination with .Close()
HTH |
Yes I tried it too. However it works via ftp and I cant use ftp. Ok no probem. Our customers are glad to what they have. I worked with form processing via internet for years. We changed several formats such as HTML forms, RTF forms, PDF forms. But none of them cant compare to Open Office forms. They are XML. I can easyly and stable read it structure extract and merge fields. It takes me a little to support this service.
So it is ok. Thank you probe1. |
|
| Back to top |
|
 |
|