Results 1 to 1 of 1

Thread: [Word]Inserting a building Block Last Page

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2008
    Posts
    1

    [Word]Inserting a building Block Last Page

    Hi i am trying to insert a building block on the last page of the MSWord Doc. I am not sure if I am getting the correct range for the last page. i am still new with word. Here is my code. I first get the building block and the create a new page and on that new page I created I want to insert the building block. The code so far.

    Thank you.

    If insertAnalyst Then

    Dim oBlock As BuildingBlock = moParentWordManager.BuildingBlockManager.GetBuildingBlock
    ("BJMUnapprovedBuildingBlocks.dotx", "TestBuildingBlock")

    If Not oBlock Is Nothing Then
    Dim oRange As Range =
    moDocument.Range(CObj(moDocument.Range().Start), CObj(moDocument.Range().End))
    oRange.InsertBreak(WdBreakType.wdPageBreak)
    oBlock.Insert(oRange)
    End If

    End If
    Last edited by Muthu00; Aug 21st, 2008 at 05:39 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width