bump product version to 6.3.0.0.beta1
[LibreOffice.git] / extensions / test / ole / DCOM / dcom_test / Module1.bas
blob27908068c28063f14d3d3a5161101ed8ba0d8389
1 rem
2 rem This file is part of the LibreOffice project.
3 rem
4 rem This Source Code Form is subject to the terms of the Mozilla Public
5 rem License, v. 2.0. If a copy of the MPL was not distributed with this
6 rem file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 rem
8 rem This file incorporates work covered by the following license notice:
9 rem
10 rem Licensed to the Apache Software Foundation (ASF) under one or more
11 rem contributor license agreements. See the NOTICE file distributed
12 rem with this work for additional information regarding copyright
13 rem ownership. The ASF licenses this file to you under the Apache
14 rem License, Version 2.0 (the "License"); you may not use this file
15 rem except in compliance with the License. You may obtain a copy of
16 rem the License at http://www.apache.org/licenses/LICENSE-2.0 .
17 rem
18 Attribute VB_Name = "Module1"
19 Option Explicit
21 Sub main()
23 MsgBox "hallo"
25 'The service manager is always the starting point
26 'If there is no office running then an office is started up
27 Dim objServiceManager As Object
28 Set objServiceManager = CreateObject("com.sun.star.ServiceManager")
30 'Create the CoreReflection service that is later used to create structs
31 Set objCoreReflection = objServiceManager.createInstance("com.sun.star.reflection.CoreReflection")
33 'Create the Desktop
34 Set objDesktop = objServiceManager.createInstance("com.sun.star.frame.Desktop")
36 'Open a new empty writer document
38 Set objCoreReflection = objServiceManager.createInstance("com.sun.star.reflection.CoreReflection")
39 'get a type description class for Size
40 Set propClass = objCoreReflection.forName("com.sun.star.beans.PropertyValue")
42 Dim prop
43 propClass.CreateObject prop
44 prop.Name = "Hidden"
45 prop.Value = True
47 'create the actual object
48 Dim args(0)
49 Set args(0) = prop
51 Dim args2()
52 'Set objDocument= objDesktop.loadComponentFromURL("private:factory/swriter", "_blank", 0, args)
53 Set objDocument = objDesktop.loadComponentFromURL("private:factory/swriter", "_blank", 0, args2)
55 End Sub