[Solved] Open new document by accessing the form template

Using them, Making them, Finding them
Post Reply
ccirtina
Posts: 17
Joined: Sat Oct 01, 2011 8:09 pm

[Solved] Open new document by accessing the form template

Post 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?
Last edited by Hagar Delest on Sun Oct 02, 2011 9:05 pm, edited 1 time in total.
Reason: tagged [Solved].
OpenOffice 4.1.3 on Windows10
ccirtina
Posts: 17
Joined: Sat Oct 01, 2011 8:09 pm

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

Post 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
OpenOffice 4.1.3 on Windows10
Post Reply