Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
BuildingBlock.Insert returns the wrong Range
I'm attempting to insert a building block into a word document using the
BuildingBlock.Insert method and then use the Range object returned to apply number formatting. However the range object returned only covers the first paragraph in the building block. Has anyone else encountered this situation and how did you get around it? Here's a segment of the code: BuildingBlock bb = template.BuildingBlockTypes.Item(WdBuildingBlockTy pes.wdTypeCustom1).Categories.Item(ref buildingBlockCategory).BuildingBlocks.Item(ref buildingBlockName) ; object rangeStart = m_WordDocument.Sections.Last.Range.End - 1; object rangeEnd = m_WordDocument.Sections.Last.Range.End - 1; Range insertedRange = bb.Insert( m_WordDocument.Range(ref rangeStart,ref rangeEnd), ref richText); |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Insert - file - range | Microsoft Word Help | |||
Macro to insert symbols results in wrong font | Microsoft Word Help | |||
Autotext returns wrong character | Microsoft Word Help | |||
VBA: For Each Cell in Range jumps out of range? | Tables | |||
Word prints the wrong page in a range on a booklet formatted doc | Microsoft Word Help |