Looking for a way to implement building blocks
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!
|