Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 09-19-2019, 05:36 AM
assie333 assie333 is offline Add Image to top and bottom of page Windows 10 Add Image to top and bottom of page Office 2013
Novice
Add Image to top and bottom of page
 
Join Date: Sep 2019
Posts: 3
assie333 is on a distinguished road
Default Add Image to top and bottom of page

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
Reply With Quote
  #2  
Old 09-22-2019, 02:18 AM
eduzs eduzs is offline Add Image to top and bottom of page Windows 10 Add Image to top and bottom of page Office 2010 32bit
Expert
 
Join Date: May 2017
Posts: 260
eduzs is on a distinguished road
Default

You need to better explain.
Same image on top and bottom (two copies of the image)? Centered?
Reply With Quote
  #3  
Old 09-22-2019, 02:42 AM
gmayor's Avatar
gmayor gmayor is offline Add Image to top and bottom of page Windows 10 Add Image to top and bottom of page Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,101
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

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
Reply With Quote
  #4  
Old 09-24-2019, 04:22 AM
assie333 assie333 is offline Add Image to top and bottom of page Windows 10 Add Image to top and bottom of page Office 2013
Novice
Add Image to top and bottom of page
 
Join Date: Sep 2019
Posts: 3
assie333 is on a distinguished road
Default

@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.
Reply With Quote
  #5  
Old 09-25-2019, 03:44 PM
Guessed's Avatar
Guessed Guessed is offline Add Image to top and bottom of page Windows 10 Add Image to top and bottom of page Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,932
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

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
Reply With Quote
  #6  
Old 09-25-2019, 04:07 PM
assie333 assie333 is offline Add Image to top and bottom of page Windows 10 Add Image to top and bottom of page Office 2013
Novice
Add Image to top and bottom of page
 
Join Date: Sep 2019
Posts: 3
assie333 is on a distinguished road
Default

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.
Reply With Quote
  #7  
Old 09-25-2019, 07:23 PM
Guessed's Avatar
Guessed Guessed is offline Add Image to top and bottom of page Windows 10 Add Image to top and bottom of page Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,932
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

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
Reply With Quote
Reply

Thread Tools
Display Modes


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
Add Image to top and bottom of page Underline at bottom of page won't go away yachts66 Word 3 08-13-2014 07:28 AM
Add Image to top and bottom of page 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
Add Image to top and bottom of page Can't Delete bottom page bad_dog81 Word 1 07-08-2011 02:54 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:32 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft