Can I force late binding?

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)
 
M

Mike McIntyre

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
 

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