![]() |
|
#1
|
|||
|
|||
![]()
Thanks a lot for the reply, Sir. The code you provided worked awesomely and inserted the buildingblock I wanted to insert but
ActiveDocument.AttachedTemplate.BuildingBlockEntri es("heading").Insert Where:= _ Selection.Range, RichText:=True still shows the error 5941. For i = 1 To Templates(oTemplate.FullName).BuildingBlockEntries .Count If Templates(oTemplate.FullName).BuildingBlockEntries (i).Name = strBuildingBlockName Then Templates(oTemplate.FullName).BuildingBlockEntries (strBuildingBlockName).Insert _ Where:=Selection.Range 'set the found flag to true bFound = True 'Clean up and stop looking Set oTemplate = Nothing GoTo lbl_Exit End If Next i This part inserted the buildings blocks I needed. But when I tried Dim oTemplate As Template Set oTemplate = ActiveDocument.AttachedTemplate Templates(oTemplate.FullName).BuildingBlockEntries ("heading").Insert _ Where:=Selection.Range It again shows error 5941. Sir, can you please suggest what may have caused this problem and how can i solve this? |
![]() |
Tags |
building bl, vba |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
wadori | Word | 3 | 12-02-2020 01:20 PM |
Alias email - unable to access folders | prgwd | Outlook | 0 | 01-17-2020 09:43 AM |
Using FieldCodes, AutoText, BuildingBlocks | ptmuldoon | Word | 5 | 01-02-2015 01:33 PM |
Unable to access attachments on older emails | charon | Outlook | 0 | 10-31-2013 05:52 AM |
Unable to access Online Templates and Clipart via Office programs | LostAngles | Office | 1 | 02-10-2012 07:20 PM |