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

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,169
Latest member
ArturoOlne
Top