2

How can I pass parameters to a com-object function by name rather than by position?

Specifically, I've a com-object function (Word document com-object SaveAs2) and for example I want to pass values to the 2 first parameters and to the last parameter (CompatibilityMode).

EliadTech
  • 1,230
  • 9
  • 14

1 Answers1

1

See this answer on Stackoverflow (short answer - you cannot directly):

https://stackoverflow.com/questions/5544844/how-to-call-a-complex-com-method-from-powershell

Zerqent
  • 336
  • 2
  • 8