본문 바로가기
programming language/Autohotkey

Autohotkey 로 Powerpoint 파일 열기

by __observer__ 2017. 2. 1.
반응형

아래 포스팅에서 작성한 바와 같이 Autohotkey 를 사용하면 COM 을 사용한 작업들을 할 수가 있습니다.

http://iamaman.tistory.com/461

COM 을 사용한 대표적인 작업으로는 Internet explorer 를 비롯하여 Microsoft Office 등을 자동활 할 수 있는데요~

오늘은 Microsoft Office powerpoint 파일을 안 보이게 여는 방법에 대해 조금 소개해 보려 합니다.

보통 엑셀 등에서는 Application object 의 visible 필드의 값을 false 로 하면 파일이 열려 있지만 보이지는 않게 설정 할 수 있습니다.

그런데 powerpoint 에서는 약간 다르더군요.

아래와 같이 file open 시에 4번째 옵션에 false 로 주면 화면에는 보여주지 않고 powerpoint 파일을 열 수 있습니다.

powerpointFile=C:\abc.pptx
pptApp := ComObjCreate("PowerPoint.Application") ; create PowerPoint object 
Xl_Workbook := pptApp.Presentations.Open(powerpointFile,,,false) ; Visible False


Xl_Workbook.Close
pptApp.Quit() 



반응형

댓글