C
Charley Kyd
I'm not able to get around a bug in FrontPage 2003. I'm hoping someone can
suggest a workaround.
Here's the relevant code:
===============
Dim nTbHeight As Integer, pwCur As FrontPage.PageWindow
With pwCur.Document.all.Item("tbMain")
nTbHeight = .offsetHeight
If nTbHeight <> .offsetHeight Then Stop
If nTbHeight < 1000 Then Stop
===============
When I run this code, it stops at the last line. I learn that the value of
..offsetHeight is 7309, but the value of nTbHeight is only 374. Even so, the
code doesn't stop at the first test. For some reason, FrontPage thinks that
374 = 7309, but it correctly determines that 374 < 1000.
I've tried:
nTbHeight = .offsetHeight + 0
nTbHeight = .offsetHeight * 1
nTbHeight = INT(.offsetHeight)
....but nothing I can do will force FrontPage to assign the correct value to
nTbHeight.
I'm using the code to create and save roughly 80 pages, starting with a
standard page that I'm using as a template. Roughly half of the saved pages
have this problem. Each time I run the code I seem to have the problem with
a different set of pages.
I'm running the code from Excel modules.
Help!
Charley
suggest a workaround.
Here's the relevant code:
===============
Dim nTbHeight As Integer, pwCur As FrontPage.PageWindow
With pwCur.Document.all.Item("tbMain")
nTbHeight = .offsetHeight
If nTbHeight <> .offsetHeight Then Stop
If nTbHeight < 1000 Then Stop
===============
When I run this code, it stops at the last line. I learn that the value of
..offsetHeight is 7309, but the value of nTbHeight is only 374. Even so, the
code doesn't stop at the first test. For some reason, FrontPage thinks that
374 = 7309, but it correctly determines that 374 < 1000.
I've tried:
nTbHeight = .offsetHeight + 0
nTbHeight = .offsetHeight * 1
nTbHeight = INT(.offsetHeight)
....but nothing I can do will force FrontPage to assign the correct value to
nTbHeight.
I'm using the code to create and save roughly 80 pages, starting with a
standard page that I'm using as a template. Roughly half of the saved pages
have this problem. Each time I run the code I seem to have the problem with
a different set of pages.
I'm running the code from Excel modules.
Help!
Charley