본문 바로가기

powerpoint

(6)
슬라이드 배경 바꾸기 ① _currentSlide.FollowMasterBackground = MsoTriState.msoFalse; ② _currentSlide.Background.Fill.ForeColor.RGB = (int)0x0000FF; ① : Master의 Background를 따르지 않겠다!! ② _currentSlide : 현재 슬라이드 (int)0x0000FF : RGB를 int 형태로 받기 때문에 이렇게 변환 하고 또한 BGR로 인식 하기 때문에 0x0000FF는 빨간색 이닷!! Pattern이나 Texture의 색을 바꾸고 싶으면 ForeColor 대신에 BackColor을 바꿔주면 된다나 머라나~ (확실하지 않음 -_-...)
다른 PPT파일로 부터 슬라이드 가져오기 다른 PPT파일로 부터 슬라이드 가져 오는 방법 입니다. try { //특정 파워포인트 파일에서 슬라이드 가져오기 //(파일위치 , 슬라이드가 들어가 위치, 가져올 슬라이드의 시작 슬라이드,가져올 슬라이드의 마지막 슬라이더) Application.ActivePresentation.Slides.InsertFromFile("d:\\test.ppt", 1, 1, 3); } catch (Exception ex) { Debug.WriteLine(ex.Message); }
PowerPoint 에 테이블 추가 하는 방법 추가 및 관리 하는 방법 //Table 추가 PowerPoint.Shape table = _currentSlide.Shapes.AddTable(3, 3, 0, 0, 100, 200); //추가된 테이블의 1번째 행에 1번째 열을 선택 table.Table.Rows[1].Cells[1].Select();
Current Slide 파워포인트 에서 현재 슬라이드를 알아 낼려고 하는데 당췌.... 알고 있는 놈이 없어 보인는군요 -.,- 그래서 꼼수 스럽게 이렇게 쓰고 있는데 혹시 요런 방법 말고 깔끔하게 떨어지는 방법 있으면 알려 줍숑 굽신굽신 꼼수 //변수 선언 private Slide _currentSlide; //슬라이드 셀렉션 체인지 이벤트 핸들러 void Application_SlideSelectionChanged(SlideRange SldRange) { _currentSlide = Application.ActivePresentation.Slides[SldRange.SlideIndex]; } 일단 이렇게 하면 알수는 있는데요. 먼가 찜찜한게 분명히 어딘가에 현재 슬라이드 값을 가지고 있는 친구가 있을것 같은데 못찾겠군요 OTL
-_-장난하나!! (CommandBar).Controls.Add(); 라는 함수를 사용 할때 첫번째 인자로 Enum 타입형태인 MsoControlType 을 받는데 이 Enum 타입에는 다양한 컨트롤들이 있는데 실제로 사용 할수 있는건 아래 보는것과 같은 놈들만 된다고 하네요!! Used with the Add method of the CommandBarControls object. Only a limited set of the control types can be created via the CommandBars object model: msoControlButton, msoControlEdit,msoControlDropdown, msoControlComboBox, msoControlPopup, and msoContro..
MenuBar에 추가하기 // If the menu already exists, remove it. private void CheckIfMenuBarExists() { try { //Menu가 있는지 체크 해서 있으면 지워버렷!! CommandBarPopup foundMenu = (CommandBarPopup)this.Application.CommandBars.ActiveMenuBar.FindControl(MsoControlType.msoControlPopup, System.Type.Missing, menuTag, true, true); if (foundMenu != null) { foundMenu.Delete(true); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }..