Re: Hooking controls by Howard
Howard
Tue Oct 03 16:02:44 CDT 2006
"zkid" <zkid@discussions.microsoft.com> wrote in message
news:A21CD45D-69AB-4748-B506-786000EC9E2C@microsoft.com...
> Hi Howard,
>
> I understand the event hook situation. I have a lot of experience with
> document management programs hooking save and save as. I suggest you
contact
> XYZ. Usually, macro vendors will have a list of macros that you can call
> from your own code to work around the hooks.
AFAIK, there is no code in the template, so there are no macros to call.
> In addition, these types of
> vendors also create hooks that prevent you from using auto macros at all;
> thus, the need to create a whole new macro to run some code and then
access
> their macros.
No macros to access,
> However, you mentioned an additional template by ScanSoft. I'm confused
> which one of these programs is giving you trouble.
Both.
But I was able to work arond the one wiht OmniPage Office Pro 14 as it was
modifying Normal template in its AutoClose and I just ignore changes to the
Normal template, which is read-only.
The problem with Scansoft PDF Converter Pro 4 is that it is modifying the
document.
The only workaround I can think of is to write a macro that saves the dirty
status onf the document, runs the Control for the PDF converter that uses
the contrtols id, then restores the document's dirty status.
Actually, I think I have code that does this for another case, I'll have to
dig it out.
>
> "Howard Kaikow" wrote:
>
> > "zkid" <zkid@discussions.microsoft.com> wrote in message
> > news:AAF61162-8888-4E0F-8B31-C7A25BB38ACB@microsoft.com...
> > > First, if a project is protected from viewing, no one can see the code
> > > without the password. So, the projects that you were able to see were
> > only
> > > passworded for changes and not for viewing (there are two levels to
> > > protecting a project).
> > There are ways to bypass the password.
> >
> > I'm convinced that they are using event hooks in an add-in, and there's
no
> > way to fight that.
> > The template in question is ScansoftPDF.dot thaty ships with th
erecently
> > released Scansoft PDF Converter Pro 4.0.
> >
> > I had a similar problem a few years ago, with Scansoft's OmniPage Office
14,
> > but was able to change my Auto macros to ignore the issue. As I recall,
they
> > were needlessly modifying the Normal template in their AutoClose.
> >
> > I suspect that are doing something just as silly in the newer product.
> >
> >
> > >Regardless, the following should work whether or not
> > > the XYZ macro is accessing another add-in:
> > >
> > > Create a macro, not an OnAction, that does what you described (i.e.,
the
> > > following):
> > >
> > > 1. Saves the document's "dirty" settings.
> > > 2. Calls the XYZ macro.
> > > 3. Once XYZ macro is complete, re-sets the document's "dirty"
settings.
> > >
> > > Provided the XYZ macro does not have an "End" code in it that cancels
all
> > > further processing, this should work.
> >
> > The problem is that I do not believe they are using macros, rather they
> > likely have hooks to the commandbar.
> > So I am unable to replace anything.
> >
> > > Regarding "dirty" settings, since you can't see the code, you might
need
> > to
> > > test the XYZ macros out on different set-ups to determine the
issue(s).
> > > Depending on what you mean by "dirty" (user's settings such as
show/hide,
> > > screen view, etc.)? A good place to start is with normal view and
turn
> > off
> > > show/hide (unless, of course, that's how XYZ leaves the screen).
> >
> > It's dirtying the ActiveDocument, which is not being changed by me.
> >
> > I rewrote ALL my global macros a few years ago, and placed the code in
DLLs.
> >
> > With OmniPage Pro Office, their template was dirtying the Normal
template.
> > Since I always have the Normal template read-pnly, I just have my
Autoclose,
> > etc. ignore changes to the Normal template.
> >
> > Th newer scansoft template is affecting the Active document, so there
is no
> > way to automatically avoid the issue.
> >
> >
> >
> >