四處望着,無法找到它。需要一個宏,以便我可以在695個不同的文件上重複695次。文檔有點不安,或者我很不走運。LibreOffice中的宏將Impress幻燈片的背景更改爲純黑色
如下我能做到這一點在微軟VBA:
Sub VbaBlackies
Dim oSl As Slide
For Each oSl In ActivePresentation.Slides
With oSl
.FollowMasterBackground = msoFalse
.DisplayMasterShapes = msoFalse
With .background
.Fill.ForeColor.RGB = RGB(0, 0, 0)
.Fill.BackColor.RGB = RGB(0, 0, 0)
End With
End With
Next oSl
End Sub
我要尋找一個在LibreOffice的BASIC類似的東西。我可以這樣開始代碼:
Sub Main
Dim oDoc As Object
Dim oDPages As Object
Dim oDPage As Object
oDoc= ThisComponent
oDPages = oDoc.getDrawPAges()
For i=0 To oDPages.count()-1
oDPage = oDPages.getByIndex(i)
oDPage.Background = RGB(0,0,0) 'This does not work.
'I have no idea on how to access the object's properties and alter them.
Next i
End Sub
有什麼想法嗎?
記錄變化的宏被手動完成。這可能會給你你需要的代碼。 – jsotola
嘗試過,但Impress不記錄宏。 –
記錄在Calc中執行類似操作的宏,更改單元格的背景顏色。給了我一些提示,但無法獲得Slide對象的「Frame」引用。 –