![]() is typed a list of valid properties for a Shape will appear, and so on. How did I know to use wdWrapFront: When = is typed the VBA Editor will automatically show a list of valid entries for text wrap formatting. The code uses CentimetersToPoints to convert the number of centimeters wanted to the Points measurement, since that's what Word uses to size graphical objects (and lots of other things). After the paste the code then picks up the existing number of pictures up to that point, plus one, to get the picture that was just pasted. If you have Sprint Layout 6 opened and want to use new macros right away, remember to exit Sprint Layout and then run it again. New macros will load the next time you open Sprint Layout 6. So this code figures out how many pictures ( InlineShapes) are already in the document up to the selection. Navigate to 'C:\Users\Public\Public Documents\Layout60\MAKROS'. What else is happening in the code: When a picture is pasted inline it's not selected. (The conversion is an extra step involved that you don't have to do in the UI - Word does it for you.)īefore this happens the code changes the size, but it could also be the other way around, changing the size on the Shape object. The following code sample uses ConvertToShape so that text wrap formatting can be applied. For future things of this nature that should give you a starting point :-) And you can convert between the two using ConvertToInlineShape / ConvertToShape. An object that behaves like a character is an InlineShape. If you need to do something like this in the future it will help you to know that an object with any kind of "text wrap" formatting (that "floats") is a Shape. Yes, that's interesting about the macro recorder. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |