![]() |
#1
|
|||
|
|||
![]()
Hi guys,
I worked at some Word documents, that had a custom tab with a button that inserted 10 specified building blocks, that are images, to a table in the document. Here is the macro for one of them. Sub ApplyOpenCommunicatie(control As IRibbonControl) ' ' ApplyOpenCommunicatie Macro ' ' With ActiveDocument Dim oBB As BuildingBlock Dim oRng As Range Dim oField As Field Dim oSection As Section Dim oHeader As HeaderFooter Dim oFooter As HeaderFooter Set oRng = ActiveDocument.Tables(1).Rows(2).Cells(2).Range oRng.End = oRng.End - 1 'to exclude the end of cell marker Set oBB = ActiveDocument.AttachedTemplate.BuildingBlockEntri es("Public") oBB.Insert Where:=oRng, RichText:=True For Each oSection In ActiveDocument.Sections For Each oFooter In oSection.Footers If oFooter.Exists Then For Each oField In oFooter.Range.Fields oField.Update Next oField End If Next oFooter Next oSection End With End Sub Now I'm looking for a way to do the same in Powerpoint. I thought about working with the Image ActiveX Element, but I don't know if I can choose between 10 different images. Does anybody have an idea what the best way would be to make the user first choose between 10 images. And when he has choosen, that the image appaers in the next footers? Thanks a lot!! I'm really stuck! |
Tags |
building blocks, insert graphic, xml |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
VBA Word - Building Block (AutoText) - Array - Replace Text with Specific Building Blocks | jc491 | Word VBA | 7 | 01-03-2016 10:34 PM |
Sharing Building Blocks | dricciuti | Word | 0 | 11-03-2013 03:40 PM |
Building blocks show correctly in dropdown, but wrong building block populates in doc | wordgirl123 | Word | 0 | 10-03-2013 08:30 AM |
![]() |
namedujour | Word | 5 | 05-03-2011 01:37 PM |
Building Blocks in Outlook | namedujour | Outlook | 2 | 04-06-2011 06:29 AM |