FrontPage COM Object Model

I

iman gowhari

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()
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top