C
Charley Kyd
I just came across a FrontPage error and a solution that might help others.
While looping through every page on my site, I occasionally got an "Invalid
procedure call or argument" error for the last line in the code fragment
below.
======
Sub Foo(pwCur As FrontPage.PageWindow)
Dim objRange As IHTMLTxtRange, sText As String
Set objRange = pwCur.Document.body.createTextRange
sText = objRange.htmlText
pwCur.Document.body.innerHTML = sText
=======
I knew that the code syntax is correct, because it worked for 95% of the
pages.
It turns out that the pages that generated the error had syntax problems
with their HTML. Several pages had an extra </a> tag, and others had an
extra </td> tag.
So if you experience this error, check your html syntax.
Regards,
Charley Kyd
ExcelUser.com
While looping through every page on my site, I occasionally got an "Invalid
procedure call or argument" error for the last line in the code fragment
below.
======
Sub Foo(pwCur As FrontPage.PageWindow)
Dim objRange As IHTMLTxtRange, sText As String
Set objRange = pwCur.Document.body.createTextRange
sText = objRange.htmlText
pwCur.Document.body.innerHTML = sText
=======
I knew that the code syntax is correct, because it worked for 95% of the
pages.
It turns out that the pages that generated the error had syntax problems
with their HTML. Several pages had an extra </a> tag, and others had an
extra </td> tag.
So if you experience this error, check your html syntax.
Regards,
Charley Kyd
ExcelUser.com