Quantcast
Channel: TechNet Blogs
Viewing all articles
Browse latest Browse all 34890

PowerTip: Use PowerShell ISE for Standard Enumerations

$
0
0

Summary: Use the Windows PowerShell ISE to use enumeration values.

Hey, Scripting Guy! Question How can I use the Windows PowerShell ISE to use the standard enumeration types to write a
           Word automation script?

Hey, Scripting Guy! Answer Cast the string as a type, and store the returned value in a variable. Each enumeration value
           will be available as a static property. Here is an example:

$HeaderFooterIndex = "microsoft.office.interop.word.WdHeaderFooterIndex" -as [type]

$HeaderFooterIndex::wdHeaderFooterFirstPage


Viewing all articles
Browse latest Browse all 34890

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>