![]() |
|
|
|
#1
|
|||
|
|||
|
Need some assistance, been playing around with some of the code and been browsing through the forum.
What I need assistance with: - Image to display on top every active word page and bottom -Be able Adjust the size of the image. as we know word shades out the header and footer and just want to display it my documents. I have come across the following code: Code:
Sub testaddshape()
Dim myshape As Shape
Set myshape = ActiveDocument.Shapes.AddPicture(FileName:="C:\Users\sim\Downloads\KAT\top.png", _
LinkToFile:=False, _
SaveWithDocument:=True, _
Left:=0, _
Top:=0, _
Width:=ActiveDocument.Sections(1).PageSetup.PageWidth, _
Height:=ActiveDocument.Sections(1).PageSetup.PageHeight)
With myshape
.ZOrder msoSendBehindText
.WrapFormat.Type = wdWrapBehind
.LockAnchor = True
.RelativeHorizontalPosition = wdRelativeHorizontalPositionPage
.RelativeVerticalPosition = wdRelativeVerticalPositionPage
.Left = 0
.Top = 0
End With
End Sub
|
|
#2
|
|||
|
|||
|
You need to better explain.
Same image on top and bottom (two copies of the image)? Centered? |
|
#3
|
||||
|
||||
|
Put the images in the header/footer. If you don't want them to be viewed as faded images, save the document as PDF and distribute that for viewing.
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
|
#4
|
|||
|
|||
|
@eduzs
Same image on top and bottom (two copies of the image)? Centred? -- to different images, like a header and footer -- Reason being my friend wants it to be shown when the document is opened. -- should be similar to a header and footer @ gmayor hope that answer your question. |
|
#5
|
||||
|
||||
|
Seems very inefficient to clutter up the doc. Wouldn't it be better to put a button on the ribbon that takes you to the top of the document?
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
|
#6
|
|||
|
|||
|
that is the idea, currently, with the below code I can put in the button in the document.
have an issue with image resize to set the height and width and then to include the bottom > footer. The document is mostly used for display purposes when reading. As the header & footer disappears. more of a visual effect to the reader. |
|
#7
|
||||
|
||||
|
Your code is setting the graphic to the same size as the first section's page size. This would mean there is no point to putting it on the page a second time.
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Paginate table so cell headings appear top of page instead bottom page when no room bottom page | mtcn | Word Tables | 5 | 12-11-2014 12:49 PM |
Underline at bottom of page won't go away
|
yachts66 | Word | 3 | 08-13-2014 07:28 AM |
Can't get margin at top and bottom of page
|
ksimmonds | Word | 2 | 06-02-2014 05:21 PM |
| Page numbers at bottom of page in Word | maggie122097 | Word | 1 | 04-21-2014 01:21 PM |
Can't Delete bottom page
|
bad_dog81 | Word | 1 | 07-08-2011 02:54 AM |