mirror of
https://github.com/Micke-K/IntuneManagement.git
synced 2026-09-28 10:55:38 +02:00
3.10.1.7
Issue 375 - Additional error handling in the Word output provider.
This commit is contained in:
@@ -409,10 +409,31 @@ function Invoke-WordPostProcessItems
|
|||||||
catch {}
|
catch {}
|
||||||
|
|
||||||
#update fields, ToC etc.
|
#update fields, ToC etc.
|
||||||
|
try {
|
||||||
$script:doc.Fields | ForEach-Object -Process { $_.Update() | Out-Null }
|
$script:doc.Fields | ForEach-Object -Process { $_.Update() | Out-Null }
|
||||||
|
}
|
||||||
|
catch {
|
||||||
|
Write-LogError "Failed to update document fields" $_.Exception
|
||||||
|
}
|
||||||
|
try {
|
||||||
$script:doc.TablesOfContents | ForEach-Object -Process { $_.Update() | Out-Null }
|
$script:doc.TablesOfContents | ForEach-Object -Process { $_.Update() | Out-Null }
|
||||||
|
}
|
||||||
|
catch {
|
||||||
|
Write-LogError "Failed to update Table of Contents" $_.Exception
|
||||||
|
}
|
||||||
|
try {
|
||||||
$script:doc.TablesOfFigures | ForEach-Object -Process { $_.Update() | Out-Null }
|
$script:doc.TablesOfFigures | ForEach-Object -Process { $_.Update() | Out-Null }
|
||||||
|
}
|
||||||
|
catch {
|
||||||
|
Write-LogError "Failed to update Table of Figures" $_.Exception
|
||||||
|
}
|
||||||
|
try {
|
||||||
$script:doc.TablesOfAuthorities | ForEach-Object -Process { $_.Update() | Out-Null }
|
$script:doc.TablesOfAuthorities | ForEach-Object -Process { $_.Update() | Out-Null }
|
||||||
|
}
|
||||||
|
catch {
|
||||||
|
Write-LogError "Failed to update Table of Authorities" $_.Exception
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Write-Log "Using document format: $($global:cbWordDocumentationFormat.SelectedValue)"
|
Write-Log "Using document format: $($global:cbWordDocumentationFormat.SelectedValue)"
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user