locked
ActiveWindow.View.ShowParagraphs is no effect! RRS feed

  • Question

  • It is impossible to control the display of "paragraph marks" with the following code. Neither "=True" nor "=False" can do that.

    ActiveWindow.View.ShowParagraphs = True

    This problem has been in existence for more than 10 years!

    Word 2007/2010/2013/2016 all have this problem!

    I change the Word language to English, the code works fine!!!


    It seems to be peculiar to the Chinese interface!

    Simplified Chinese and Traditional Chinese both not work!



    ==================================================================

    In Chinese:

    在Word“文件→选项→显示”中,有一个选项是“段落标记”,可以控制是否显示段落标记。

    但是用vba语句“ActiveWindow.View.ShowParagraphs = True”或“ActiveWindow.View.ShowParagraphs = False”无法控制这个开关。

        With ActiveWindow.View
            .ShowTabs = False                             '制表符
            .ShowSpaces = False                         '空格
            .ShowParagraphs = True                   '段落标记
            .ShowHiddenText = False                  '隐藏文字
            .ShowHyphens = False                      '可选连字符
            .ShowObjectAnchors = True              '对象位置
            .ShowOptionalBreaks = False            '可选分隔符
            .ShowAll = False                                '显示所有格式标记
        End With

    上面这段代码,本是用于依次控制“显示”选项中的“制表符、空格、段落标记、隐藏文字、可选连字符、对象位置、可选分隔符、显示所有格式标记”等选项。

    但唯独.ShowParagraphs = True无效,其余几句代码都能正常控制对应选项的开启与关闭。


    我在网上也有看到其他人有反馈过这个问题,我也在多台电脑中用不同版本的Word进行了测试。

    这应该是一个存在了很久的BUG,Word2007/2010/2013/2016都不行。

    我把Office更新到目前最新的v16.0.11425.20228(Monthly更新通道)进行测试,还是没修复。

    希望官方能尽早修复这个BUG!!!

    我使用的Office版本是:v16.0.11425.20228 简体中文 64位

    ==================================================================

    网上反馈这个问题的链接:(早在2009年,也就是10年前,就有人反馈这个问题了,官方就是不修复?)

    doc.ActiveWindow.View.ShowParagraphs is no effect.
    https://social.msdn.microsoft.com/Forums/en-US/99f7eca0-0e61-41ac-8182-ee544de615ba/docactivewindowviewshowparagraphs-is-no-effect

    hides paragraph marks in the active window in office2010 with VBA
    https://answers.microsoft.com/en-us/office/forum/office_2010-word/hides-paragraph-marks-in-the-active-window-in/0b63260a-b56b-e011-8dfc-68b599b31bf5

    word 2007中使用宏设置/取消段落标记无效
    https://answers.microsoft.com/zh-hans/msoffice/forum/msoffice_word-mso_other/word/40b8e717-6529-46b0-bfa8-e6596fb26b69

    Toggling does not work at all at VST/VBA (Hide/Show Enter marking).
    https://social.msdn.microsoft.com/Forums/en-US/19aaff1e-29be-4081-97be-2be94eae8719/toggling-does-not-work-at-all-at-vstvba-hideshow-enter-marking

    Word 2013/2016 can't use vba to control the display of "paragraph marks"
    https://word.uservoice.com/forums/304924-word-for-windows-desktop-application/suggestions/35788870-word-2013-2016-can-t-use-vba-to-control-the-displa

    word2010隐藏段落标记
    http://club.excelhome.net/thread-1143565-1-1.html

    无法使用VBA去掉段落标记
    http://club.excelhome.net/thread-1345304-1-1.html

    用VBA无法控制“段落标记”的显示?这是Word的Bug吗?
    http://club.excelhome.net/thread-1436750-1-1.html

    word2007如何用VBA实现去掉段落标记
    http://club.excelhome.net/forum.php?mod=redirect&goto=findpost&ptid=593873&pid=5400308

    Monday, May 13, 2019 1:47 PM