On 22/03/06, D. Michel Morelli <[EMAIL PROTECTED]> wrote:
> Marco Caresia ha scritto:
> > D. Michel Morelli wrote:
> >>
> >> Il problema è che non posso salvare il documento come modello, ma come
> >> sxw (e prossimamemnte odt). :(
> >>
> >> Utilizzo OpenOffice 2.0.2.
> >>
> >
> > Perché non lo puoi salvare come modello di documento (ott o stw)???
>
> Perche' il file mi viene "spedito" tramite Firefox e non posso farmi
> spedire un stw perche' il programma "che spedisce" digerisce gli sxw.
> > In alternativa, tramite macro,  inserirei dei segnalibri nel testo,
> > farei un dialogo con i controlli per inserire le variabili e
> > utilizzerei i cursori del testo per cambiare i valori dei segnalibri.
>
> Spiega spiega..
> Oppure un RTFM preciso plz...
>
> M.
>
> --
> -------------------------------
> Studio Legale Sutti
> Via Montenapoleone 8
> 20121 Milano
> Central e-mail: [EMAIL PROTECTED]
> Web http://www.sutti.com
> Tel. +39-02-762041
> Fax +39-02-76204805
> ----------
> This message is from a law firm. It is confidential and may be
> *privileged*. If it is not intended for you please inform us then delete
> it. If its  content is not about the business of the firm or of its
> clients then the message is neither from nor sanctioned by the firm. Use
> of this or any other e-mail facility of Studio Legale Sutti signifies
> consent to interception by Studio Legale Sutti.
> ----------
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
Un po' di codice se vuoi seguire la mia strada tortuosa (ora lo provo
anch'io perche' ancora non l'ho fatto)

Crea una finestra di dialogo chiamata Mask nella libreria standard. In
questa finestra di dialogo metti un pulsante OK (che devi definire
come pulsante OK) e un campo data (o un campo qualunque in cui puoi
immettere del testo) che chiami txtDate.
Nel documento metti un bookmark chiamato bkm_date dove vuoi che venga
inserita la data.

Ciaociao,

Michele



Global oDlgMask As Object

Sub subInsertDataAtBookmarks
        Dim oBookmarks As Object
        Dim oBookmark As Object
        Dim oDlgCtrl As Object
        Dim sDate As String

        'load the library
        GlobalScope.DialogLibraries.loadLibrary( "Standard" )
        oDlgMask = createUnoDialog(DialogLibraries.Standard.Mask)
        ' create the list of bookmarks
        oBookmarks = thisComponent.getBookmarks()
        
        'run the dialog, if Ok has been pressed then write the date at the 
bookmark
        If oDlgMask.execute() Then
                oDlgCtrl = oDlgMask.getControl("txtDate")
                sDate = oDlgCtrl.getText()
                
                oBookmark = oBookmarks.getByName("bkm_date")
                If isNull(oBookmark) Then
                        MsgBox "Bookmark not found"
                Else
                        oBookMark.getAnchor.setString(sDate)    
                End If
        End If

End Sub

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Rispondere a