<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="http://www.de12werken.nl/lib/exe/css.php?s=feed" type="text/css"?>
<rdf:RDF
    xmlns="http://purl.org/rss/1.0/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel rdf:about="http://www.de12werken.nl/feed.php">
        <title>Notes - microsoft:office:scripting</title>
        <description></description>
        <link>http://www.de12werken.nl/</link>
        <image rdf:resource="http://www.de12werken.nl/lib/exe/fetch.php?media=wiki:dokuwiki.svg" />
       <dc:date>2026-04-05T14:12:38+00:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="http://www.de12werken.nl/doku.php?id=microsoft:office:scripting:powershell&amp;rev=1485444334&amp;do=diff"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="http://www.de12werken.nl/lib/exe/fetch.php?media=wiki:dokuwiki.svg">
        <title>Notes</title>
        <link>http://www.de12werken.nl/</link>
        <url>http://www.de12werken.nl/lib/exe/fetch.php?media=wiki:dokuwiki.svg</url>
    </image>
    <item rdf:about="http://www.de12werken.nl/doku.php?id=microsoft:office:scripting:powershell&amp;rev=1485444334&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2017-01-26T15:25:34+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>powershell</title>
        <link>http://www.de12werken.nl/doku.php?id=microsoft:office:scripting:powershell&amp;rev=1485444334&amp;do=diff</link>
        <description>Microsoft - Office - Scripting - PowerShell

Notes

Update table of contents


$strDocument = &quot;C:\Temp\Document.docx&quot;
$objMSWord = New-Object -ComObject Word.Application
$objMSWord.Visible = $false
$objDocument = $objMSWord.Documents.Open($strDocument)

# Update the table of contents.
# A foreach seems to be needed.
# $objDocument.TablesOfContents[X].Update does nothing, and .Update() gets you:
# &quot;Method invocation failed because [System.__ComObject] does not contain a method named &#039;Update&#039;.&quot;
# …</description>
    </item>
</rdf:RDF>
