I really need some help with a Visual Basic problem. I am using Visual
Basic .NET and want find some text with a certain style in an MS
Office document. I have written something like:
Dim oFind As Object
oDoc.Content.Se lect()
oFind = oWord.Selection .Find
oFind.ClearForm atting()
oFind.Style = oDoc.Styles("My Style").Style ' <= The error occurs here.
oFind.Execute(F indText:="", Forward:=True, Format:=True)
I get the following build error: "'Font' is not a by reference
property". OK, so the right side of the erronous expression returns a
reference and the left side expects a value, but how the heck do I
convert to a value?? I can't find any information about this in the
Visual Studio help files or on the web.
Does anybody have any suggestions?
Basic .NET and want find some text with a certain style in an MS
Office document. I have written something like:
Dim oFind As Object
oDoc.Content.Se lect()
oFind = oWord.Selection .Find
oFind.ClearForm atting()
oFind.Style = oDoc.Styles("My Style").Style ' <= The error occurs here.
oFind.Execute(F indText:="", Forward:=True, Format:=True)
I get the following build error: "'Font' is not a by reference
property". OK, so the right side of the erronous expression returns a
reference and the left side expects a value, but how the heck do I
convert to a value?? I can't find any information about this in the
Visual Studio help files or on the web.
Does anybody have any suggestions?
Comment