FrontPage COM Object Model

iman gowhari igowhari at gmail.com
Thu Aug 17 16:00:14 EDT 2006


I want to get frontpage web and page object models with this code.
OnPageNew works properly but when I click on the page nothing happen.

from win32com.client import DispatchWithEvents
import time, pythoncom, msvcrt

class FrontPageEvents:
    def __init__(self):
        print 'FrontPageEvents'
    def OnPageNew(self, page):
        DispatchWithEvents(f.ActiveDocument, PageEvents)

class PageEvents:
    def __init__(self):
        print 'PageEvents'
    def onclick(self):
        print 'onclick'

f=DispatchWithEvents("FrontPage.Application", FrontPageEvents)
while not msvcrt.kbhit():
    pythoncom.PumpWaitingMessages()
    time.sleep(.2)
msvcrt.getch()




More information about the Python-list mailing list