R
Renate
Hi all,
I am writing some code that places a picture in a document. This works
perfect. I only have one question.
I am setting the width of the picture to a fixed number. Then I want
to check if the hight of this picture still fits on the current page.
If it doesn't, I need to calculate the maximum possible height and
change the width accordingly.
I know I can use the Information(wdVerticalPositionRelativeToPage) to
find out on what the top position is of my picture relative to the top
of the page.
This document has multiple sections with different for primary - and
first pages. Some footers have a style with spacebefore to make the
space on the page smaller then other pages. Therefor I can't just use
the bottom margin of the current section.
I need something like the vertical position of the selection relative
to the bottom of the page but AFAIK there's no property to get this
info.
I can find out on which section I am working with the information
property but I can't seem to figure out on which sectionpage I am
working. I need this in order to find out how much space is available
on the current page (pageheight - (top margin + bottom margin + space
before on current footer)).
Does anybody have a clue on how to solve this or perhaps a suggestion
for another technique that may lead to the same results?
TIA,
Renate
I am writing some code that places a picture in a document. This works
perfect. I only have one question.
I am setting the width of the picture to a fixed number. Then I want
to check if the hight of this picture still fits on the current page.
If it doesn't, I need to calculate the maximum possible height and
change the width accordingly.
I know I can use the Information(wdVerticalPositionRelativeToPage) to
find out on what the top position is of my picture relative to the top
of the page.
This document has multiple sections with different for primary - and
first pages. Some footers have a style with spacebefore to make the
space on the page smaller then other pages. Therefor I can't just use
the bottom margin of the current section.
I need something like the vertical position of the selection relative
to the bottom of the page but AFAIK there's no property to get this
info.
I can find out on which section I am working with the information
property but I can't seem to figure out on which sectionpage I am
working. I need this in order to find out how much space is available
on the current page (pageheight - (top margin + bottom margin + space
before on current footer)).
Does anybody have a clue on how to solve this or perhaps a suggestion
for another technique that may lead to the same results?
TIA,
Renate