Hi,

> I write a extention.
> In my  extention how can I get openoffice program path.

Sub Test
        Dim oService as Object
        oService = CreateUnoService("com.sun.star.util.PathSubstitution")
        ' see 
http://www.openoffice.org/api/docs/common/ref/com/sun/star/util/PathSubstitution.html
 for details
        MsgBox oService.getSubstituteVariableValue("inst")

        ' get your Extension Path
        ' 
http://www.openoffice.org/api/docs/common/ref/com/sun/star/deployment/PackageInformationProvider.html
        oService =
getDefaultContext().getByName("/singletons/com.sun.star.deployment.PackageInformationProvider")
        MsgBox oService. getPackageLocation("my.extension.identifier")
End Sub


Regards

Oliver

-- 

GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45



Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to