Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Saving HTML background image as watermark in Word 1

Status
Not open for further replies.

CubeE101

Programmer
Nov 19, 2002
1,492
US
OK... I thought about posting this in VBA forum, but there are more users here, I tend to favor this forum, AND I am using VB after all... (not VBA) ;-)

With that said...

I am using XML in an aplication to populate combo boxes, data grids, etc...
Then there is more XML stuff going on behind the scenes to pick other data depending on what is selected...

Then you click a report button which does even more with XML and results in a Temporary DOM object Which is Converted to HTML with an XSLT document I made and is displayed in a New form with a Web Browser Object...

In the background, there is a water mark image...

Since the image is on our network...
I set it up to create a Word session, open the HTML file, then save it as a Doc file, to package the image in the file for external use...

Now if you are in Web View, the image is shown, but print/document view the image is hidden...

Is there a way to set the html background image to a Visible Water Mark when printed from the Word Doc file...?

Visit My Site
PROGRAMMER: (n) Red-eyed, mumbling mammal capable of conversing with inanimate objects.
 
To print the watermark it must be inserted into the header or footer (Word 2000).
 
OK...

So now I can Open the Document...
Documents.Open ...
Access the header:
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
Add the image:
Dim x As InlineShape
Set x = Selection.InlineShapes.AddPicture(FileName:="C:\test.jpg", LinkToFile:=False, SaveWithDocument:=True)


...

Then Restore the Main Document View...
ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument

But now how do you programatically Set the Text Wrapping for the picture to Behind Text, and Center the Image on the document?
* The macro recorder effectively disables the mouse... (ONLY Microsoft...)

Thanks for the Header Tip... It's been years since I placed a watermark in word (I believe it was with 97 ;-))

Visit My Site
PROGRAMMER: (n) Red-eyed, mumbling mammal capable of conversing with inanimate objects.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top