Thx! But resizing via macro does NOT work if your pictures have been set to "Wrap Text -> In Front of Text". 😥 Why does Word treat pictures so differently in the modes "In Line with text" and "In Front of Text"? Who can explain?
If the image is in line with text, then it will be treated as an image. If there is some sort of text wrapping activated, it will be treated as a shape. When you follow the link in the video description, you will find the code for both options on my website.
Hi, I am trying to do the first option but when I go to the next picture and press F4 I get the doc app option screen come up. Im using a Mac desktop, can you advise what I am doing wrong please? Thank you! :)
im trying to copy over from excel a table and one of the columns has the images (over 1000). but when i copy and paste into word to create the table. the images are massive (bigger than the page). i want to make sure all images stay the same so that when i paste table from excel into word, the column width doesn't change and the image inside are fit to the column width.
This will likely depend a bit on the copy/paste option. But in any case, the macro should be able to solve the problem and adjust the width for you. Of course, this only helps if you want all your images to have the same width.
Simple code but I can't find solutions whole day today! I want to change .Width only (same for all images - 2cm) but I want to keep the proportions. So if I remove .Height this code will change .Width only and .Height will be a same - so I will lose deform my images! How to fix that?
@@LeonRenner It doesn't work on Word 97-2003 version of documents - find that later! Work everithing exept this .LockAspectRatio . This .LockAspectRatio work only in .xdoc (new version of Word).
@@LeonRenner Sir, I got the same problem, if I delete the line for height, the image will have a distortion, because it changed the width only, the ratio was not being kept, even though I reserved the line-"LockAspectRatio = msoTrue". Could you please give me some suggestion.
@LeonRenner This worked great for me. Is there a way that we can add code to the macro that would then save all the images for us in a folder after they have been re-sized?
Glad to hear. Yes, I’m sure that there is a way, since macros is Word are super powerful. Basically while looping through the pictures, you’d simply have to add a function to export the images.
It's not that it's depending on the orientation of the image, but it will simply set the same width (or height) for all images. What you are trying to achieve is resizing two groups of images with different values. You'd have to adapt the code to check if the height is larger than the width (which would mean portrait orientation) and then set a specific value for that if-condition. And in an else condition you could then set another value.
If this video helped you, you could do me an awesome favor and destroy that like button 😍🙌 Thanks a lot!
Thx! But resizing via macro does NOT work if your pictures have been set to "Wrap Text -> In Front of Text". 😥
Why does Word treat pictures so differently in the modes "In Line with text" and "In Front of Text"? Who can explain?
If the image is in line with text, then it will be treated as an image. If there is some sort of text wrapping activated, it will be treated as a shape. When you follow the link in the video description, you will find the code for both options on my website.
Hi, I am trying to do the first option but when I go to the next picture and press F4 I get the doc app option screen come up. Im using a Mac desktop, can you advise what I am doing wrong please? Thank you! :)
Hi Sarah, not sure how it works on Mac as Word for Mac has different functions and different short keys
im trying to copy over from excel a table and one of the columns has the images (over 1000). but when i copy and paste into word to create the table. the images are massive (bigger than the page). i want to make sure all images stay the same so that when i paste table from excel into word, the column width doesn't change and the image inside are fit to the column width.
This will likely depend a bit on the copy/paste option. But in any case, the macro should be able to solve the problem and adjust the width for you. Of course, this only helps if you want all your images to have the same width.
How do I set a marco function to only resize figures that exceed a certain width while other figures whose width are smaller remain untouched?
You'll need to do a check (if-clause) on the width property of the picture/shape
Brilliant. Thanks for this massive time saver.
Glad I could help :)
Simple code but I can't find solutions whole day today! I want to change .Width only (same for all images - 2cm) but I want to keep the proportions. So if I remove .Height this code will change .Width only and .Height will be a same - so I will lose deform my images!
How to fix that?
In my code there is an added line for locking the aspect ratio
@@LeonRenner It doesn't work on Word 97-2003 version of documents - find that later! Work everithing exept this .LockAspectRatio . This .LockAspectRatio work only in .xdoc (new version of Word).
You have to change the lock aspect ratio to "LockAspectRatio = msoFalse"
@@defendkebab3683 no, this would remove the aspect ratio and lead to a distortion of the image.
@@LeonRenner Sir, I got the same problem, if I delete the line for height, the image will have a distortion, because it changed the width only, the ratio was not being kept, even though I reserved the line-"LockAspectRatio = msoTrue". Could you please give me some suggestion.
Thank you very much!!!It really helps and save lots of time!
Glad to help ☺️❤️
@LeonRenner This worked great for me. Is there a way that we can add code to the macro that would then save all the images for us in a folder after they have been re-sized?
Glad to hear. Yes, I’m sure that there is a way, since macros is Word are super powerful. Basically while looping through the pictures, you’d simply have to add a function to export the images.
@@LeonRenner Alright thanks. I will give it a shot!
Respected sir Vanakkam Thanks for this lesson given Guidances.
By M.Duraipandi (male)Senior Learner.
Your Channel subscriber
Thank you 🙏❤️
@@LeonRenner🙏🙏🙏
You, Sir, are a champion!😝
Thank you :)
Outstanding.
Thank you ❤️😊
Thank you! Your instructions are the only ones anywhere that worked for me. ✨
Glad to hear that ❤️🙌
Cannot find the created codes; how to get them? Thanks!
You'll find it in the video description :)
very helpful
Thanks again :)
Beautiful
Thank you :)
Simple explanation ❤
Thank you ❤😊
Thanks a lot really
I'm glad I could help ☺❤
Hi Leon, is this Macro possible depending on photo orientation. I'd like all portrait photos at 3.5 width and all landscapes as 7 width?
It's not that it's depending on the orientation of the image, but it will simply set the same width (or height) for all images. What you are trying to achieve is resizing two groups of images with different values. You'd have to adapt the code to check if the height is larger than the width (which would mean portrait orientation) and then set a specific value for that if-condition. And in an else condition you could then set another value.
@@LeonRenner Great thanks!
My keyboard F4 is to not function of youchpad
then you most likely have an additional key which is called "Fn". Press that at the same time when you press "F4"