> Can I do an If then statement that then refers to the following If then
> statement and relate the two with an and?
>
> Example: the code inserts one picture that position on the page depends
> onthe format of the second picture
In short: "It depends"
You can, for instance, put the first picture into a variable that you
then test once the second picture is there, and move accordingly.
Alternatively, you could add the second picture first and then add the
first picture second, which allows you to test the condition as the
picture is inserted, rather than correcting it post-facto.
I can't offer more detailed help without better understanding the problem.

Signature
Ed Bennett - MVP Microsoft Publisher
http://ed.mvps.org
Stella - 09 Jul 2007 10:26 GMT
Thats what I want to achieve:
If picture1 is height > length and picture2 is as well height > lengths
under these conditions
position picture1 Left Top and picture2 Left Top
Do you still think its best to put the first picture into a variable and
then test once the second picture is there and move accordingly?
> > Can I do an If then statement that then refers to the following If then
> > statement and relate the two with an and?
[quoted text clipped - 11 lines]
>
> I can't offer more detailed help without better understanding the problem.
Ed Bennett - 09 Jul 2007 13:15 GMT
> Thats what I want to achieve:
>
[quoted text clipped - 4 lines]
> Do you still think its best to put the first picture into a variable and
> then test once the second picture is there and move accordingly?
That depends on whether Picture1 and Picture2 have been added.
Some proto-code:
Picture1 = (Page).AddPicture(...)
Picture2 = (Page).AddPicture(...)
If (Picture1.Height > Picture1.Width) And (Picture2.Height >
Picture2.Length) Then
Picture1.Top
Picture1.Left
Picture2.Top
Picture2.Left
End If

Signature
Ed Bennett - MVP Microsoft Publisher
http://ed.mvps.org