Discussion:
Watermarks
(too old to reply)
Peter Karlström
2006-09-19 13:41:02 UTC
Permalink
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
--
Peter Karlström
Midrange AB
Sweden
Cindy M.
2006-09-19 13:54:29 UTC
Permalink
Hi =?Utf-8?B?UGV0ZXIgS2FybHN0csO2bQ==?=,

Learn to work with the RANGE and other objects and not selection. Using
Selection to work with headers and footers is a catastrophe just waiting to
happen. See my reply to your previous posting for how to get the range of a
header or footer.
Post by Peter Karlström
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.
<<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?
Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)
Peter Karlström
2006-09-19 14:06:02 UTC
Permalink
Hi Cindy

Thanks for your quick reply.

I'll look into that.

Regards
--
Peter Karlström
Midrange AB
Sweden
Post by Cindy M.
Hi =?Utf-8?B?UGV0ZXIgS2FybHN0csO2bQ==?=,
Learn to work with the RANGE and other objects and not selection. Using
Selection to work with headers and footers is a catastrophe just waiting to
happen. See my reply to your previous posting for how to get the range of a
header or footer.
Post by Peter Karlström
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.
<<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?
Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org
This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)
Loading...