Can I force late binding?

  • Thread starter Thread starter Robin Tucker
  • Start date Start date
R

Robin Tucker

I've run foul of this bug advisory from Microsoft:

http://support.microsoft.com/default.aspx?scid=kb;en-us;292744

My preferred solution of the two listed is to use late binding. I have
Option Strict "On" in my source file. Regardless of this, is there any way
I can force late binding of the following method call?

Thanks for any tips you can give me (note: "myWordDocument" is a
Word.Document!).

' Find and replace section with page breaks.

myWordDocument.Range.Find.Execute( _
FindText:="^b", _
MatchCase:=True, _
MatchWholeWord:=True, _
MatchWildcards:=False, _
MatchSoundsLike:=False, _
MatchAllWordForms:=False, _
Forward:=True, _
Wrap:=Word.WdFindWrap.wdFindContinue, _
Format:=False, _
ReplaceWith:="^m", _
Replace:=Word.WdReplace.wdReplaceAll)
 
Hi Robin,

Is is possible for you to extract some of your code into a separate source
file where you can explicitly set OPTION STRICT OFF for just that code?


--
Mike

Mike McIntyre
Visual Basic MVP
www.getdotnetcode.com
 
Back
Top