none
Run-time error 5941 RRS feed

  • Question

  • I like to set automatic method and Macro with the following steps:

    1. Select All text

    2. Modify all text to Calibri 8

    3. Add pagination

    Please find code:

    Sub ModifyContent1()

    ModifyContent1 Macro
        Selection.WholeStory
        Selection.Font.Name = "Calibri"
        Selection.Font.Size = 8
        WordBasic.ViewFooterOnly
        ActiveDocument.AttachedTemplate.BuildingBlockEntries("Two rows 2"). _
            Insert Where:=Selection.Range, RichText:=True
        ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
    End Sub

    How to do in the correct way such Macro?

    Monday, October 3, 2016 9:41 AM

Answers

  • Hi,

    Since your questions is related to macro, I'm moving it to the dedicated Word for Developer forum for further assistance. That's where most of the Office development experts hang out:

    https://social.msdn.microsoft.com/Forums/office/en-US/home?forum=worddev

    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.

    Regards,

    Ethan Hua


    Please remember to mark the replies as an answers if they help and unmark them if they provide no help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    • Marked as answer by toplisek Sunday, November 6, 2016 5:36 PM
    Tuesday, October 4, 2016 7:47 AM

All replies

  • Hi,

    Since your questions is related to macro, I'm moving it to the dedicated Word for Developer forum for further assistance. That's where most of the Office development experts hang out:

    https://social.msdn.microsoft.com/Forums/office/en-US/home?forum=worddev

    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.

    Regards,

    Ethan Hua


    Please remember to mark the replies as an answers if they help and unmark them if they provide no help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    • Marked as answer by toplisek Sunday, November 6, 2016 5:36 PM
    Tuesday, October 4, 2016 7:47 AM
  • Hi toplisek,

    According to your description, please check whether "Two rows 2" BuildingBlock exists.

    Open this Word Template, then Insert->Quick Parts->Building Blocks Organizer...

    Thanks for your understanding.

    Wednesday, October 5, 2016 1:01 AM