79238201

Date: 2024-11-29 19:47:41
Score: 1
Natty:
Report link

Could anyone explain to me why, upon running this script I get the following error: [Unable to find type]?

Therefore:

# NOTE:
#  Windows PowerShell only - doesn't work in PowerShell (Core) 7, as of v7.4.x
using assembly Microsoft.Office.Interop.Word
using namespace Microsoft.Office.Interop.Word
using namespace System.Management.Automation

$ErrorActionPreference = [ActionPreference]::Stop
[Application]$wordApp = new-object -comobject Word.Application
$wordApp.Name # Get and output the .Name property value, for demonstration purposes.
$wordApp.Quit()
Reasons:
  • RegEx Blacklisted phrase (2.5): Could anyone explain
  • RegEx Blacklisted phrase (1): I get the following error
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • High reputation (-2):
Posted by: mklement0