Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-29-2015, 11:18 PM
gmayor's Avatar
gmayor gmayor is offline Macro to select an { includepicture } field code and format the picture behind text and 100% scale Windows 7 64bit Macro to select an { includepicture } field code and format the picture behind text and 100% scale Office 2010 32bit
Expert
 
Join Date: Aug 2014
Posts: 4,142
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 ofgmayor has much to be proud of
Default

Once you change an inline shape to a shape it is no longer an inline shape so you cannot process it as such. The following should work



Code:
Sub fixLetterHead()
Dim oInlineShape As InlineShape
Dim oShape As shape
    For Each oInlineShape In Selection.InlineShapes
        Set oShape = oInlineShape.ConvertToShape
        With oShape
            .RelativeHorizontalPosition = wdRelativeHorizontalPositionPage
            .RelativeVerticalPosition = wdRelativeVerticalPositionPage
            .Top = 0
            .Left = 0
            .WrapFormat.Type = wdWrapBehind
            .ScaleHeight 1, True
            .ScaleWidth 1, True
        End With
    Next oInlineShape
End Sub
__________________
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
  #2  
Old 03-30-2015, 10:12 AM
sanpedro sanpedro is offline Macro to select an { includepicture } field code and format the picture behind text and 100% scale Windows 8 Macro to select an { includepicture } field code and format the picture behind text and 100% scale Office 2007
Novice
Macro to select an { includepicture } field code and format the picture behind text and 100% scale
 
Join Date: Feb 2015
Posts: 4
sanpedro is on a distinguished road
Smile

Thank you very much! this works perfectly. i have amended it slightly by having a Exit For statement at the end of the for loop to only convert the first picture it finds. probably not the best way to do it but it works well so far.

Thank you
Reply With Quote
Reply

Tags
formatting, picture



Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to select an { includepicture } field code and format the picture behind text and 100% scale Using IncludePicture and MailMerge to insert picture Elena Mail Merge 25 02-06-2022 05:35 PM
Microsoft Word macro to find text, select all text between brackets, and delete helal1990 Word VBA 4 02-05-2015 03:52 PM
Macro to select an { includepicture } field code and format the picture behind text and 100% scale VBA code for Microsoft Word macro — select text and insert footnote ndnd Word VBA 10 01-06-2015 01:47 PM
Macro to select an { includepicture } field code and format the picture behind text and 100% scale Is it possible to not select all text upon entering a form field? pruppert Word 6 07-16-2012 08:01 PM
Word Editing Text for Picture format sarun5 Word 2 05-27-2009 11:51 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:12 PM.


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