Creating UNO service

The third line of this code generates an “object not set” error.

  Dim objEvent As Object
  objEvent = CreateUnoService("com.sun.star.awt.MouseEvent")
  MsgBox objEvent.Dbg_Properties

The mouse event name was extracted from a mouse event. What am I doing wrong?

Edit: Never mind.

Dim objEvent As New com.sun.star.awt.MouseEvent

It runs without errors for me:

Sub Test()
  Dim objEvent As New com.sun.star.awt.MouseEvent
  MsgBox objEvent.Dbg_Properties
End Sub  
Version: 24.8.6.1 (X86_64) / LibreOffice Community
Build ID: 051bf11303684a0a982c9966e8be766d0a9efbc7
CPU threads: 6; OS: Windows 10 X86_64 (10.0 build 19045); UI render: Skia/Raster; VCL: win
Locale: ru-RU (ru_RU); UI: en-US
Calc: CL threaded

Because it is a structure, not a UNO service.

https://api.libreoffice.org/docs/idl/ref/structcom_1_1sun_1_1star_1_1awt_1_1MouseEvent.html