OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Close OO after submitting

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
Nicki
Newbie
Newbie


Joined: 26 Dec 2005
Posts: 4

PostPosted: Fri Apr 28, 2006 7:39 am    Post subject: Close OO after submitting Reply with quote

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
View user's profile Send private message
probe1
Moderator
Moderator


Joined: 18 Aug 2004
Posts: 2560
Location: Chonburi Thailand Asia

PostPosted: Fri Apr 28, 2006 8:11 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Nicki
Newbie
Newbie


Joined: 26 Dec 2005
Posts: 4

PostPosted: Fri Apr 28, 2006 9:41 am    Post subject: Reply with quote

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
View user's profile Send private message
probe1
Moderator
Moderator


Joined: 18 Aug 2004
Posts: 2560
Location: Chonburi Thailand Asia

PostPosted: Fri Apr 28, 2006 2:21 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Nicki
Newbie
Newbie


Joined: 26 Dec 2005
Posts: 4

PostPosted: Sun Apr 30, 2006 12:15 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group