PowerPoint VBA는 OLEFormat Object의 링크를 중단합니다
-
13-12-2019 - |
문제
두 개의 임베디드 Excel 객체가있는 PowerPoint 2007 슬라이드가 있습니다. Sheet1 탭에 액세스하고 모든 링크를 중단하고 싶습니다. 나는 가치로 복사하여 붙여 넣기를 시도했지만, 코드가 실행 되더라도, 그것은 아무것도하지는 않습니다. 어떤 도움이 크게 감사드립니다.
슬라이드로 Dim OSL 멍청한 osheet Dim PPAPP는 PowerPoint.Application으로서 파워 포인트로 희미한 PPPRES.Presentation
ActivePresentation의 각 OSL에 대한
OSL.shapes
의 각 OSH에 대해ActiveWindow.View.GotoSlide oSl.SlideIndex
If oSh.Type = msoEmbeddedOLEObject Then
oSh.OLEFormat.Activate
With oSh.OLEFormat.Object
.Application.Workbooks(1).Worksheets(1).Cells.Copy
.Application.Workbooks(1).Worksheets(1).Cells.PasteSpecial Paste:=xlPasteValues
End With
ActiveWindow.Selection.Unselect
ActiveWindow.View.GotoSlide oSl.SlideIndex
End If
Next
.
다음 종료 하위
해결책
updating / edited ... 응용 프로그램 업데이트 줄을 건너 뛰고, 그렇게 시도하십시오 :
If oSh.Type = msoEmbeddedOLEObject Then
With oSh.OLEFormat.Object ' added .Object here
.Activate
.Application.workbooks(1).worksheets(2).Cells.Copy
.Application.workbooks(1).worksheets(2).Cells.PasteSpecial Paste:=xlPasteValues
End With
End if
.
첫째, 위의 코드에서 -4163으로 xlpastevalues를 Long= -4163으로 정의하거나 XLPasteValues를 -4163으로 바꿉니다.
제휴하지 않습니다 StackOverflow