Peter Karlström
2006-09-19 13:41:02 UTC
Hi
I'm developing a COM-Addin for Word as a part of a integration to a system
for document management.
It is a rich and database-dependent Addin which creates and maintains
documents using specialized toolbar functions.
For som of our documents we want to add a Watermark to the document.
We use the function:
<<Selection.HeaderFooter.Shapes.AddTextEffect(PowerPlusWaterMarkObject1,
"The Text to Show", "Times New Roman", 66, False, False, 0, 0).Select>>
which is a part result of macro-recording.
If we use this function in Words menus, the text is nicely put on every page
in the document.
But when we run the exact same code from our COM-Addin the text only appears
on the first page.
Also, when the Watermark is created from the COM-Addin and we use the Format
- Backgrund - Watermark menu, the "no Watermark" is set.
A funny thing is that the PowerPlusWaterMarkObject1 (the msoPresetTextEffect
parameter) is of no value in Word, i.e. gets equal to zero.
Doeas anyone have a solution to this problem?
Thanks in advance
Regards
I'm developing a COM-Addin for Word as a part of a integration to a system
for document management.
It is a rich and database-dependent Addin which creates and maintains
documents using specialized toolbar functions.
For som of our documents we want to add a Watermark to the document.
We use the function:
<<Selection.HeaderFooter.Shapes.AddTextEffect(PowerPlusWaterMarkObject1,
"The Text to Show", "Times New Roman", 66, False, False, 0, 0).Select>>
which is a part result of macro-recording.
If we use this function in Words menus, the text is nicely put on every page
in the document.
But when we run the exact same code from our COM-Addin the text only appears
on the first page.
Also, when the Watermark is created from the COM-Addin and we use the Format
- Backgrund - Watermark menu, the "no Watermark" is set.
A funny thing is that the PowerPlusWaterMarkObject1 (the msoPresetTextEffect
parameter) is of no value in Word, i.e. gets equal to zero.
Doeas anyone have a solution to this problem?
Thanks in advance
Regards
--
Peter Karlström
Midrange AB
Sweden
Peter Karlström
Midrange AB
Sweden