Created
July 6, 2018 07:36
-
-
Save PrzemyslawKlys/c1132a64e25b2a3ae5b84a3049a685ac to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Test-Array { | |
param ( | |
[string[]] $other = @(), | |
[bool[]] $thisValue = @(), | |
[bool[]] $Bold = @(), | |
[bool[]] $Italic = @() | |
) | |
$thisValue.GetType() | |
$bold.GetType() | |
foreach ($value in $thisValue) { | |
$value.GetType() | |
$value | |
#Test-Array -thisValue $value | |
} | |
for ($i = 0; $i -lt $thisValue.Count; $i++) { | |
$thisValue[$i] | |
} | |
} | |
function Set-WordText1 { | |
[CmdletBinding()] | |
param( | |
[parameter(ValueFromPipelineByPropertyName, ValueFromPipeline)][Xceed.Words.NET.InsertBeforeOrAfter[]] $Paragraph, | |
[alias ("C")] [System.Drawing.Color[]]$Color = @(), | |
[alias ("S")] [double[]] $FontSize = @(), | |
[alias ("FontName")] [string[]] $FontFamily = @(), | |
[bool[]] $Bold = @(), | |
[bool[]] $Italic = @(), | |
[bool[]] $diff = @(), | |
[alias ("U")] [UnderlineStyle[]] $UnderlineStyle = @(), | |
[alias ('UC')] [System.Drawing.Color[]]$UnderlineColor = @(), | |
[alias ("SA")] [double[]] $SpacingAfter = @(), | |
[alias ("SB")] [double[]] $SpacingBefore = @(), | |
[alias ("SP")] [double[]] $Spacing = @(), | |
[alias ("H")] [highlight[]] $Highlight = @(), | |
[alias ("CA")] [CapsStyle[]] $CapsStyle = @(), | |
[alias ("ST")] [StrikeThrough[]] $StrikeThrough = @(), | |
[alias ("HT")] [HeadingType[]] $HeadingType = @(), | |
[int[]] $PercentageScale = @(), # "Value must be one of the following: 200, 150, 100, 90, 80, 66, 50 or 33" | |
[Misc[]] $Misc = @(), | |
[string[]] $Language = @(), | |
[int[]]$Kerning = @(), # "Value must be one of the following: 8, 9, 10, 11, 12, 14, 16, 18, 20, 22, 24, 26, 28, 36, 48 or 72" | |
[bool[]]$Hidden = @(), | |
[int[]]$Position = @(), # "Value must be in the range -1585 - 1585" | |
[bool[]] $NewLine = @(), | |
[switch] $KeepLinesTogether, | |
[switch] $KeepWithNextParagraph, | |
[single[]] $IndentationFirstLine = @(), | |
[single[]] $IndentationHanging = @(), | |
[Alignment[]] $Alignment = @(), | |
[Direction[]] $Direction = @(), | |
[ShadingType[]] $ShadingType = @(), | |
[Script[]] $Script = @(), | |
[bool] $Supress = $true | |
) | |
Write-Verbose "Set-WordText - Paragraph Count: $($Paragraph.Count)" | |
Write-Verbose "Set-WordText - $($diff.GetType())" | |
$bold.GetType() | |
for ($i = 0; $i -lt $Paragraph.Count; $i++) { | |
Write-Verbose "Set-WordText - Loop: $($i)" | |
$Bold[$i].GetType() | |
# $Paragraph[$i] = $Paragraph[$i] | Set-WordTextBold -Bold $Bold[$i] -Supress $false | |
# $Paragraph[$i] = $Paragraph[$i] | Set-WordTextItalic -Italic $Italic[$i] -Supress $false | |
} | |
} | |
Set-WordText1 -Paragraph $null, $null -Bold $null, $null -Verbose | |
Test-Array -thisValue $null, $null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment