https://msdn.microsoft.com/VBA/Word-VBA/articles/view-showheading-method-word

View.ShowHeading Method (Word)

office 365 dev account|Last Updated: 6/12/2017

|

1 Contributor

Shows all headings up to the specified heading level and hides subordinate headings and body text.

Syntax

expression . ShowHeading( Level )

expression Required. A variable that represents a View object.

Parameters

Name Required/Optional Data Type Description
Level Required Long The outline heading level (a number from 1 to 9).

Remarks

This method generates an error if the view isn't outline view or master document view.

Example

This example switches the active window to outline view and displays all text that's formatted with the Heading 1 style. Body text and all other types of headings are hidden.

With ActiveDocument.ActiveWindow.View
.Type = wdOutlineView
.ShowHeading 1
End With

This example switches the window for Document1 to outline view and displays all text that's formatted with the Heading 1, Heading 2, or Heading 3 style.

With Windows("Document1").View
.Type = wdOutlineView
.ShowHeading 3
End With

See also

Concepts

View Object

VBA Code for Word Navigation Pane 【failed】 view-showheading-method-word的更多相关文章

  1. Java for LeetCode 126 Word Ladder II 【HARD】

    Given two words (start and end), and a dictionary, find all shortest transformation sequence(s) from ...

  2. 【Leetcode_easy】748. Shortest Completing Word

    problem 748. Shortest Completing Word 题意: solution1: class Solution { public: string shortestComplet ...

  3. 【LeetCode】748. Shortest Completing Word 解题报告(Python)

    作者: 负雪明烛 id: fuxuemingzhu 个人博客: http://fuxuemingzhu.cn/ 目录 题目描述 题目大意 解题方法 日期 题目地址:https://leetcode.c ...

  4. 【LeetCode】819. Most Common Word 解题报告(Python)

    作者: 负雪明烛 id: fuxuemingzhu 个人博客: http://fuxuemingzhu.cn/ 目录 题目描述 题目大意 解题方法 正则+统计 日期 题目地址:https://leet ...

  5. 【MVC】View与Control之间数据传递

    1. Controller向View传递数据 使用ViewData传递数据[弱类型,字典型ViewDataDictionary] ViewData[“Message_ViewData”] = “ He ...

  6. 【LeetCode】- Length of Last Word(最后一个单词的长度)

    [ 问题: ] Given a string s consists of upper/lower-case alphabets and empty space characters ' ', retu ...

  7. 【leetcode】Length of Last Word

    题目简述 Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return ...

  8. 【原创】asp.net导出word 检索 COM 类工厂中 CLSID 为 {000209FF-0000-0000-C000-000000000046} 的组件失败,原因是出现以下错误: 8000401a

    我的服务器:windows server 2008(64位)+microsoft office 2007 企业版 业务:网站导出应聘word简历. 出现以下错误: 检索 COM 类工厂中 CLSID ...

  9. 【转】关于 Endnote 与 Word 卡死问题 标记语法错误

    转自:http://hi.baidu.com/lvneng/item/8147dcbb1436bfd085dd7962 当使用 Word 写论文或稿件时,Endnote 绝对是一个不错的帮手,不过偶尔 ...

随机推荐

  1. Reentrant 可重入解释

    作者:知乎用户链接:https://www.zhihu.com/question/37168009/answer/88086943来源:知乎著作权归作者所有.商业转载请联系作者获得授权,非商业转载请注 ...

  2. Python Unittest模块测试执行

    记录一下Unittest的测试执行相关的点 一.测试用例执行的几种方式 1.通过unittest.main()来执行测试用例的方式: if __name__ == "__main__&quo ...

  3. git还原本地提交的某个历史记录

    转载地址:http://jingyan.baidu.com/article/e4511cf33479812b855eaf67.html 1.以还原index2.html文件为例,打开index2.ht ...

  4. kibana中信息分类查询显示的方法

    1.什么是kibana? kibana是ELK(elasticsearch+logstash+kibana)中的K,它是一个可灵活的分析和可视化平台,主要是显示数据以及根据这些数据绘出一些可视化图表, ...

  5. C#中对XML的操作

    现在有一个xml文件,名称:BookStore.xml,数据如下: <?xml version="1.0" encoding="gb2312"?>& ...

  6. 原生js大总结六

    051.如何打印当前浏览器的版本等信息   navigator.userAgent   返回包含浏览器版本等信息的字符串 ,常用于判断浏览器版本及使用设备(PC或者移动端   052 .在浏览器地址栏 ...

  7. ajax中打开新页面使用window.open方法被拦截的解决方法

    $('.testA').unbind('click').bind('click',function(){ var result=""; $.ajax({ url:'http://l ...

  8. 编程——C语言的问题,比特率

    1;; bps是bits per second的缩写,是指传输速度,音乐采样速度等,表示为: 比特/秒.

  9. GCJ 2009 Round 2 Problem A. Crazy Rows

    https://code.google.com/codejam/contest/204113/dashboard 题目大意: 给你一个矩阵,让你转化为下三角矩阵,每次只能交换相邻的行,求最小的交换次数 ...

  10. C语言深度剖析-----函数与指针的分析

                          指针的本质 指针需要保证指向任意数据类型,所以指针变量都占用32位bit即4字节. PS:不同机器上,指针占用内存不一                   ...