Hi there,
Progress 9.1d
Windows XP
I'm using Microsoft Word to automatically add a watermark to letters when users request a re-print. This is done using OLE commands and works like a charm. Except for the color. I can't get this part right.
The VB-code looks like this:
Selection.ShapeRange.Fill.ForeColor.RGB = RGB(192, 192, 192)
And I translated it into
[MyComHandle]:selection:shaperange:fill:forecolor:rgb = (192,192,192).
Here comes the snag.... the rgb method is not an method of forecolor. rgb is an method of colorformat, but colorformat is not an method of the fill com-handle or the forecolor com-handle.
According to the Com Object Viewer the sintax using the ForeColor method should look like:
[MyComHandle]:selection:shaperange:fill:forecolor.
I've tried it even a little different ([myComHandle]:selection:font:color = [value]) but this won't work because the inserted wartermark is a draw object and therefore it isn't possible to set the color like this.
Has anyone done this, I know that Philip Knoetze (see his post on watermarks) has done something like this. But he was/is a Guest....
Any help greatly appreciated!
Progress 9.1d
Windows XP
I'm using Microsoft Word to automatically add a watermark to letters when users request a re-print. This is done using OLE commands and works like a charm. Except for the color. I can't get this part right.
The VB-code looks like this:
Selection.ShapeRange.Fill.ForeColor.RGB = RGB(192, 192, 192)
And I translated it into
[MyComHandle]:selection:shaperange:fill:forecolor:rgb = (192,192,192).
Here comes the snag.... the rgb method is not an method of forecolor. rgb is an method of colorformat, but colorformat is not an method of the fill com-handle or the forecolor com-handle.
According to the Com Object Viewer the sintax using the ForeColor method should look like:
[MyComHandle]:selection:shaperange:fill:forecolor.
I've tried it even a little different ([myComHandle]:selection:font:color = [value]) but this won't work because the inserted wartermark is a draw object and therefore it isn't possible to set the color like this.
Has anyone done this, I know that Philip Knoetze (see his post on watermarks) has done something like this. But he was/is a Guest....
Any help greatly appreciated!