https://bugs.freedesktop.org/show_bug.cgi?id=45096
Bug #: 45096
Summary: Macros: Macro code does not work (WMI)
Classification: Unclassified
Product: LibreOffice
Version: LibO 3.5.0 RC1
Platform: Other
OS/Version: All
Status: UNCONFIRMED
Status Whiteboard: BSA
Severity: normal
Priority: medium
Component: BASIC
AssignedTo: [email protected]
ReportedBy: [email protected]
Problem description:
http://www.oooforum.org/forum/viewtopic.phtml?t=41219
Option Compatible
Sub Main
Dim a As ScriptControl
Set a = New ScriptControl
a.Language = "VBscript"
sWMI = "winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2"
sQuery = "Select * from Win32_ComputerSystem"
a.AddCode "Function user(w,s): " & _
"Set oQ = GetObject(w).ExecQuery(s)" & Chr(10) & _
"For Each ob In oQ:user=ob.UserName:Next:End Function"
MsgBox a.Run("user", sWMI, sQuery)
End Sub
******************************************************************
******************************************************************
Macro code work in Libre Office 3.4.x
Macro code does not work in Libreoffice 3.5.0 RC1
Is it a bug?
******************************************************************
******************************************************************
BASIC runtime error.
'1'
Type: com.sun.star.uno.RuntimeException
Message: [automation bridge]UnoConversionUtilities<T>::anyToVariant
Conversion of any with string to VARIANT with type: 101 failed! Error code:
-2147352568
Steps to reproduce:
1. ....
2. ....
3. ....
Current behavior:
Expected behavior:
Platform (if different from the browser):
Browser: Opera/9.80 (Windows NT 6.1; U; hr) Presto/2.10.229 Version/11.60
--
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs