<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<TITLE>OT: Word VBA - skip code?</TITLE>
<META content="MSHTML 5.50.4923.2500" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=954335313-22072003><FONT face=Arial color=#0000ff size=2>I've
heard that holding the <SHIFT> key will bypass the event. You just
need to figure out how to automate holding the key in
code...</FONT></SPAN></DIV>
<DIV><SPAN class=954335313-22072003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=954335313-22072003><FONT face=Arial color=#0000ff
size=2>Scott</FONT></SPAN></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> Roz Clarke
[mailto:roz.clarke@donnslaw.co.uk]<BR><B>Sent:</B> Tuesday, July 22, 2003 9:21
AM<BR><B>To:</B> AccessD (AccessD@databaseadvisors.com)<BR><B>Subject:</B>
[AccessD] OT: Word VBA - skip code?<BR><BR></FONT></DIV>
<P align=left><FONT face=Arial size=2>Hello everyone</FONT></P>
<P align=left><FONT face=Arial size=2>Another nasty problem for you.</FONT>
<FONT face=Wingdings size=2>J</FONT></P>
<P align=left><FONT face=Arial size=2>I have been asked to insert an
additional line into all our precedent letters (there are a few thousand). So
far so doody; I can find the right insertion point and put the line
in.</FONT></P>
<P align=left><FONT face=Arial size=2>What</FONT><FONT face=Arial
size=2>'</FONT><FONT face=Arial size=2>s stopping me is that many of the
precedent letters have code of their</FONT><FONT face=Arial size=2> own.
Somewhere in the loop below, I need to prevent any code in the Open event of
t</FONT><FONT face=Arial size=2>he document from running.</FONT></P>
<P align=left><FONT face=Arial size=2>If Application.FileSearch.Execute > 0
Then</FONT></P>
<P align=left><FONT face=Arial size=2> For i = 1 To
Application.FileSearch.FoundFiles.Count</FONT></P>
<P align=left><FONT face=Arial
size=2> </FONT> <FONT face=Arial
size=2>strN</FONT><FONT face=Arial size=2>ame =
Application.FileSearch.FoundFiles(i)</FONT></P>
<P align=left><FONT face=Arial
size=2> Set</FONT> <FONT face=Arial
size=2>objD</FONT><FONT face=Arial size=2>oc =
wrdapp.Documents.Open(</FONT><FONT face=Arial size=2>strN</FONT><FONT
face=Arial size=2>ame)</FONT></P>
<P align=left><FONT face=Arial
size=2> If</FONT> <FONT face=Arial
size=2>objD</FONT><FONT face=Arial size=2>oc.ReadOnly = False Then</FONT></P>
<P align=left><FONT face=Arial
size=2> Set
myRange =</FONT> <FONT face=Arial size=2>objD</FONT><FONT face=Arial
size=2>oc.Content</FONT></P>
<P align=left><FONT face=Arial
size=2>
myRange.Find.Execute FindText:=strFindText, Forward:=True</FONT></P>
<P align=left><FONT face=Arial
size=2>
myRange.InsertAfter strTestText</FONT></P>
<P align=left><FONT face=Arial
size=2> End If</FONT></P>
<P align=left><FONT face=Arial
size=2> doc.Close</FONT></P>
<P align=left><FONT face=Arial size=2> Next i</FONT></P>
<P align=left><FONT face=Arial size=2>The procedures I need to kaibosh all
have the same name: Document_Open</FONT><FONT face=Arial size=2>
(obviously)</FONT><FONT face=Arial size=2>, if that helps.</FONT><FONT
face=Arial size=2> How can I get my code to bypass those
procedures??</FONT></P>
<P align=left><FONT face=Arial size=2>Yours hopefully</FONT></P>
<P align=left><FONT face=Arial size=2>Roz</FONT></P></BLOCKQUOTE></BODY></HTML>