1) Process 를 이용해서 Powerpoint 를 실행

    1         Dim MyStartInfo As New Diagnostics.ProcessStartInfo(strFileName)

    2 

    3         Dim MyProcess As New Diagnostics.Process

    4         MyProcess.StartInfo = MyStartInfo

    5         MyProcess.Start()


2) PowerPoint 의 instance 를 생성하여 선언한 변수에 할당

    1 

    2         Dim app As Microsoft.Office.Interop.PowerPoint.Application

    3         Dim pre As Microsoft.Office.Interop.PowerPoint.Presentation

    4 

    5         'app = DirectCast(GetObject("Powerpoint.Application"), Microsoft.Office.Interop.PowerPoint.Application)

    6         app = DirectCast(CreateObject("Powerpoint.Application", ""), Microsoft.Office.Interop.PowerPoint.Application)

    7 

    8         app = New Microsoft.Office.Interop.PowerPoint.Application()

    9 

   10         Pre = app.Presentations.Open(strFileName, Microsoft.Office.Core.MsoTriState.msoTrue, Microsoft.Office.Core.MsoTriState.msoTriStateMixed, 0)


3) 1)을 이용해서 생성한 PowerPoint 의 instance 를 BindToMoniker 를 이용해서 선언한 변수에 할당

    1         Dim MyStartInfo As New Diagnostics.ProcessStartInfo(strFileName)

    2         Dim MyProcess As New Diagnostics.Process

    3 

    4         MyProcess.StartInfo = MyStartInfo

    5         MyProcess.Start()

    6 

    7         Dim pre As Microsoft.Office.Interop.PowerPoint.Presentation

    8 

    9         pre = DirectCast(System.Runtime.InteropServices.Marshal.BindToMoniker(strFileName), Microsoft.Office.Interop.PowerPoint.Presentation)



흠... 그런데 안타까운 것은 위 모든 방법들이 XP 에서는 통용이 되지만
Window7 으로 올라와서는 Error 를 발생한다는 것.
간단한 예제에서는 에러 없이 실행이 되지만 많은 COM 들 속에서는 에러를 발생한다는 것.
하나하나 잡아야 하는 숙제가 있긴 하지만 많은 Case 를 테스트해 나가야하는 숙제가 남아 있다.

각 OS 에 대한, 각 Office Version 에 대한 Test를 진행해야한다.

대표적인 에러는
다음과 같다.


으잉? Monikor 에 대한 에러메세지만 있네...

다른 에러메세지는 캡쳐해서 다시 올리겠습니다.^^'


행복한 고수되십시요...

반응형

아래에서 다운로드 받으셔요... ㅡㅡ'

Download details: Office 2003 Editions Resource Kit Tools

행복한 고수되셔요...
반응형

모두들 오픈오픈을 외치며 오픈 한 곳들을 찾아 다니지만
정작 본인들은 오픈을 하고 있지 않더라고요.

제가 아시는 분의 글에 공감하여 제 글들을 다시 살펴봤더니만
제 글들도 펌 방지를 해 놓았더라고요.
제가 별다른 옵션을 주지 않았는데도 말입니다.

그래서 혼났어요...
지금 방금도 한차례 혼이 나고... 부랴부랴 찾아 봤는데...
기본 옵션에는 없더라고요. 글쓰기 옵션에도 없고... ㅡㅡ

그러다 찾아 냈습니다.

플러그인으로 들어가 있네요...


맨 아래 보시면 CallBack 기능이 있는데 원작자 글에 대한 내용이 나타난다고 하는데... ㅋㅋ
여튼 뭐 자세히 보진 않았지만 표면적으로는 괜찮은 내용같습니다.
그런데 이 플러그인도 제가 설치한것 같진 않은데... ㅋㅋ
(기억이 잘 안나네요... 제가 했겠죠 뭐... ㅋㅋㅋ)


이로써 혼나는 거 그만 할 수 있겠네요...
아~~ 행복해... ㅋㅋㅋ


그럼 행복한 고수되셔요...


woojja ))*
\\\\\\\\\\\\\\\\\\\\\\\\\\\\
반응형

+ Recent posts