-
Aug 23rd, 2012, 01:19 PM
#1
Thread Starter
Addicted Member
[RESOLVED] Watermark on my word doc
I'm writing some data on word doc from vb6 application. There are many pages.
I want to insert Watermark (it's a big logo) on each page.
Can anyone suggest or pm some good code or links.
-
Aug 23rd, 2012, 03:15 PM
#2
Hyperactive Member
Re: Watermark on my word doc
When dealing with this sort of thing, it's easiest to record a macro, take a look at the Word-generated code, then adapt for your particular need.
The recorded macro:
Code:
ActiveDocument.Sections(1).Range.Select
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
Selection.HeaderFooter.Shapes.AddPicture(FileName:="C:\MyPicture.png", _
LinkToFile:=False, SaveWithDocument:=True).Select
Selection.ShapeRange.Name = "WordPictureWatermark26334388"
Selection.ShapeRange.PictureFormat.Brightness = 0.85
Selection.ShapeRange.PictureFormat.Contrast = 0.15
Selection.ShapeRange.LockAspectRatio = True
Selection.ShapeRange.Height = InchesToPoints(2.79)
Selection.ShapeRange.Width = InchesToPoints(6.5)
Selection.ShapeRange.WrapFormat.AllowOverlap = True
Selection.ShapeRange.WrapFormat.Side = wdWrapNone
Selection.ShapeRange.WrapFormat.Type = 3
Selection.ShapeRange.RelativeHorizontalPosition = _
wdRelativeVerticalPositionMargin
Selection.ShapeRange.RelativeVerticalPosition = _
wdRelativeVerticalPositionMargin
Selection.ShapeRange.Left = wdShapeCenter
Selection.ShapeRange.Top = wdShapeCenter
ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
-
Aug 23rd, 2012, 10:13 PM
#3
Thread Starter
Addicted Member
Re: Watermark on my word doc
Should I have to use it after completion of all of my pages or I have to run it after/before page.?
-
Aug 24th, 2012, 09:29 AM
#4
Hyperactive Member
Re: Watermark on my word doc
Since you're dealing with the header (not a particular page), I wouldn't think it would matter.
-
Aug 27th, 2012, 04:30 AM
#5
Thread Starter
Addicted Member
Re: Watermark on my word doc
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|