Note that there are some explanatory texts on larger screens.

plurals
  1. POIn vbs how would I close out of the navigation window in Microsoft Word?
    primarykey
    data
    text
    <p>I have a script that goes though and sorts and removes tables that I don't need. I found that the script slows down to nothing when the Navigation window is open. I have tried so much that It would take me a while to list. Google shows little hope.</p> <p>EDIT: Here is a basic version of the code I'm using to sort through the tables. I tried to clean it up the junk as much as I can. The code works just fine for sorting the tables I just want to know how to close out of the Navigation window in WORD.</p> <pre><code> For Each oTable In objDoc.Tables Table.innerHTML = "On Table " &amp; Tablenum &amp; " of " &amp; TotalTables If oTable.Columns.Count = 2 Then oTable.Cell(1,1).Select Set rng = objSelection If objSelection.Information(wdWithInTable) Then If Instr(1,rng, "SRS_",1 ) &gt; 0 Then For row = 0 to oTable.Rows.Count rowcount = oTable.Rows.Count Dim SrsTag Dim deleteit oTable.Cell(row,1).Select Set rng = objSelection If Instr(1,rng, "SRS_",1 ) &gt; 0 Then objSelection.Cells(1).Range.Select strTag = objSelection strTag = Replace(strTag," ","") strTag = Replace(strTag,vbCr," ") strTag = Replace(strTag,vbLf," ") strTagarr = Split(strTag) SrsTag = strTagarr(0) If UBound(strTagarr) &gt; 1 Then deleteit = True For airframe = 1 To UBound(strTagarr) If Instr(1,strTagarr(airframe), Frame, 1 ) &gt; 0 And len(strTag) &gt; 1 And strTag &lt;&gt; " " Then deleteit = False End If Next Else deleteit = False End If If deleteit = True Then objSelection.Rows.Delete rowcount = rowcount - 1 If (rowcount = 0) Then TableCount = TableCount - 1 Exit For Else row = row - 1 End If Else objSelection.TypeText(SrsTag) End If End If Next Else objSelection.Move End If End If End If Next </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload