Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 11-20-2020, 05:44 AM
ksor ksor is offline Formatting picture Windows 10 Formatting picture Office 2016
Advanced Beginner
Formatting picture
 
Join Date: Feb 2018
Location: Århus V, Denmark
Posts: 78
ksor is on a distinguished road
Default Formatting picture

I use this code to format a picture - just a frame around it

Sub FormatPicture()
'
' FormatPicture Makro
'
With Selection
If .InlineShapes.Count <> 1 Then Exit Sub
With .InlineShapes(1)
With .Borders
.Enable = True


.OutsideLineWidth = wdLineWidth300pt <<<<<<<<<<<<<<<< crashes here when stepping through ???
.OutsideLineStyle = wdLineStyleSingle
.OutsideColorIndex = wdBlack
End With
End With
End With
End Sub

but it ONLY works if the picture is "in line with text" !

How can I change it to work on "flowting pictures too ?


EDIT: Too I noticed that the machines freezes/crashes at the marked line when stepping through the code - why

Last edited by ksor; 11-20-2020 at 09:02 AM.
Reply With Quote
 

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formatting picture Inserting and formatting a picture BLUEPUPIL Word VBA 2 04-28-2019 03:14 PM
Formatting picture Picture formatting. voyagerone Drawing and Graphics 3 05-31-2016 09:55 PM
Picture Formatting Problem thowes2 Word 1 04-24-2013 05:24 PM
Formatting picture Picture Formatting Issues mayj Word 1 04-02-2013 03:09 AM
Formatting picture insert object or picture, strange formatting layout qwertyjjj Word 5 01-10-2013 09:49 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 05:10 AM.


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