Page 1 of 1

[Solved] Open new document by accessing the form template

Posted: Sat Oct 01, 2011 8:22 pm
by ccirtina
Am un template.stw si cand dau new in momentul deschiderii doresc sa se incarce formularul de dialog, in Microsoft Office aceasta comanda se insereaza in ThisDocument :
Private Sub Document_New()
Application.WindowState = wdWindowStateMinimize
Intrare.Show
Set Intrare = Nothing
End Sub

Acest script cum se scrie si unde se insereaza in open office?

Excuse English:
I have a new template.stw and they give when they want to load opening dialogue form, in Microsoft Office this command is inserted in ThisDocument :
Private Sub Document_New()
Application.WindowState = wdWindowStateMinimize
Intrare.Show
Set Intrare = Nothing
End Sub

This script how to write and which is inserted into the open office?

Re: How do you open a new document by accessing the form tem

Posted: Sun Oct 02, 2011 3:14 pm
by ccirtina
Rezolvata problema.
Tools → Customize → Events → New Document →Assign Macro :

Code: Select all

global oDialog1 as object

Sub Dialog1Show
DialogLibraries.LoadLibrary( "Standard" )
oDialog1 = CreateUnoDialog( DialogLibraries.Standard.Dialog1 )
oDialog1.Execute()
End Sub
Cel mai greu este ca nu prea ai exemple sau documentatie care sa te scoata din diferite situatii dificile