user keystrokes interpretted by publisher

B

bcarsto

I am automating publisher (2003) within my c++ application. The ffollowing
code illustrates how I am opening a pub file are interating through shapes.
within this loop, if a user clicks any keys on the keyboard, the keysstrokes
are accepted by publisher and actually appear on the resulting publisher
document.

Publisher::_DocumentPtr Template = m_app->Open(Document, variant_t(true),
variant_t(false), Publisher::pbDoNotSaveChanges);
Template->ActiveWindow->PutVisible(_variant_t(true));

long lTotPag = Template->Pages->Count;
for (long lPag = 1; lPag <= lTotPag; lPag++)
{
Publisher::pagePtr Page = Template->Pages->GetItem(lPag);
Template->ActiveView->PutActivePage(Page);
Page = Template->ActiveView->GetActivePage();
iTotShp = Page->Shapes->Count;
// perform operations on textbox shapes in the page
}

Am I doing something wrong here? The publisher document is not visible
during my shapes loop, but the users keystrokes are appearing in the
finisheed publisher document. Is there a way to prevent this? Has anyone else
seen this?

thanks
Bob
 
B

bcarsto

For anyone interested we worked around this problem by using

Template.ActiveWindow.WindowState = pbWindowStateMinimize;
 

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

Top