Windows 10: Changing size of images pasted to email body in Outlook 2016

Discus and support Changing size of images pasted to email body in Outlook 2016 in Browsers and Email to solve the problem; This is a something that was always a nagging problem but got worse when I found a solution as it only worked for about 2 times then quit.*Sad I have... Discussion in 'Browsers and Email' started by questorfla, Mar 21, 2017.

  1. Changing size of images pasted to email body in Outlook 2016


    This is a something that was always a nagging problem but got worse when I found a solution as it only worked for about 2 times then quit.*Sad
    I have to use a screen capture utility (currently Lightscreen) to capture specific images on my screen and when I paste the results of the capture into the body of an email it is always too large by exactly double. This is regardless of the size of the screen area captured.
    After pasting, I have to select the image click on picture settings and reduce the size by 50% on every one of them to get things to the proper perspective when emailed. This takes several clicks to do and in searching i found others with the same issue. I also found one person that posted a 'fix' using a custom VBA for Outlook.
    The VBA was originally written to reduce by 75% but it worked perfect at 50% as well. One click of the macro would reduce all images in the email to 50% scale regardless of how many were there. Perfect! It worked for about 3 times, Just enough for me to be pleased i had a solution...Then suddenly it didn't.
    It no longer works on the system it started on nor will it work on another system i tried it on. At this point I am beginning to suspect something to do with VBA in Outlook 2016. I even created a self-signed cert for it and signed the VBA module but at this point, even if i remove everything and try starting from scratch, i cannot get it to work again.
    Below is the exported .bas file from Outlook if anything sticks out.
    Or if anyone can suggest another way to achieve the same results? This is used to send screenshots of specific situations to people by email so it is almost always the same steps. I might find the answer in a different screen-capture utility but at this point I sure wish I knew why the VBA stopped working regardless.
    Below is the code for the Macro to reduce by images 50%. This macro is then added to the QAT bar.

    Code: Attribute VB_Name = "Module1"Sub ResizeAllPicsTo50Pct() Const wdInlineShapePicture = 3 Dim olkMsg As Outlook.MailItem, wrdDoc As Object, wrdShp As Object Set olkMsg = Application.ActiveInspector.CurrentItem Set wrdDoc = olkMsg.GetInspector.WordEditor For Each wrdShp In wrdDoc.InlineShapes If wrdShp.Type = wdInlineShapePicture Then wrdShp.ScaleHeight = 50 wrdShp.ScaleWidth = 50 End If Next Set olkMsg = Nothing Set wrdDoc = Nothing Set wrdShp = NothingEnd Sub[/quote]

    :)
     
    questorfla, Mar 21, 2017
    #1

  2. how do i change my print screen that saves as a link - i want it as an image i can paste in a body of an email etc.

    how do i change my print screen that saves as a link - i want it as an image i can paste in a body of an email etc.
     
    LynnPereira, Mar 21, 2017
    #2
  3. File Explorer & Outlook: Where did that email go?

    In the last 48 hours, something new has started occurring when I attach images (using 'send to' function) from File Explorer into Email (using Microsoft Outlook). In the past the images would load into an email after prompting me to set file size. Now after
    the sizing prompt nothing happens, no email appears, no error message.

    Any ideas on where those emails are going or not going?
     
    rickschoellhorn, Mar 21, 2017
    #3
  4. DavidY Win User

    Changing size of images pasted to email body in Outlook 2016

    What happens when you run the VBA? Is there an error message or similar?
    Given the context... perhaps you could post a screenshot. *Wink (Ideally NOT reduced to 50%!)

    I tried it quickly in Outlook 2016 and it seems to work for me.
     
    DavidY, Mar 21, 2017
    #4
  5. I agree I did for me as well. Did you use a self signed certificate? Or just disable Macro checks or? On further reading of the original post i found others who also had problems. Some reported back that it started working again but failed to say if they had done anything do fix it. At this point, i am just relieved to know someone else has it working as it is a perfect solution for my needs.
    if you have manged to close Outlook and then reopen it and find it still working then i have to assume it is something about my copy of Outlook, maybe a different add-in or other program.
    PS: I am not at the office where the original systems is but i can load it here and try it on this one and if I get results will post them
    There are no errors, it just doesn't do anything all when selected. If i posted an image it might or might nort need reduction, Most of the ones that do are if pasted in to WORD or OUTLOOK and it is pretty obvious that they are larger than they are in real-life is the reason for the needed reduction.
     
    questorfla, Mar 21, 2017
    #5
  6. DavidY Win User
    I just opened Outlook and pasted in the code from your post (with some Carriage Returns to keep VBA happy) and tried it on a test email. I didn't change any settings, I think (can't remember what I did when setting up the laptop but pretty sure I've not changed much). I don't even know how to make a self-signed certificate I'm afraid. *Redface
    It's possible I'm not running the latest Outlook 2016 though.

    What happens when you try it?

    Edit: saw your PS. I'd probably open the VBA editor, ideally position Windows so you can see both the VBA Editor and the email window, and run the macro in 'Step Into' mode to see what happens step-by-step. Might give you a clue.
     
    DavidY, Mar 21, 2017
    #6
  7. Give me a few secs to load it here. the self signed signature thing uses an app in outlook located at C:\Program Files (x86)\Microsoft Office\root\Office16 named "selfcert.exe". you can run that to create your own personal signing certificate using any name you want.
    Then you can use this to sign VBA's or other modules as needed.
    In the
    Changing size of images pasted to email body in Outlook 2016 [​IMG]


    this is what happens copy paste direct into the panel here >> Looks Pretty small.
    This is where you set the Macro Security option in Trust Center Looks small now i will see what happens when i click post.
    The answer is it enlarges perfectly so you can see what I mean
     
    questorfla, Mar 21, 2017
    #7
  8. Changing size of images pasted to email body in Outlook 2016

    I see what you mean about adding line feeds *Sad it didn't look that way when i posted it Sorry
     
    questorfla, Mar 21, 2017
    #8
  9. so far so good. Created macro, added to QAT. open new email added pic from clipboard, clicked button in QAT and it worked as advertised. On this system i have Macros enabled fully have not done any self signing etc. Just keeping track. I have also not restarted outlook to see if it saves the macro as enabled
    here is the correct coding for anyne else if they should want it with the line feeds intact *Smile

    "Sub ResizeAllPicsTo50Pct() Const wdInlineShapePicture = 3
    Dim olkMsg As Outlook.MailItem, wrdDoc As Object, wrdShp As Object
    Set olkMsg = Application.ActiveInspector.CurrentItem
    Set wrdDoc = olkMsg.GetInspector.WordEditor
    For Each wrdShp In wrdDoc.InlineShapes
    If wrdShp.Type = wdInlineShapePicture Then
    wrdShp.ScaleHeight = 50
    wrdShp.ScaleWidth = 50
    End If
    Next
    Set olkMsg = Nothing
    Set wrdDoc = Nothing
    Set wrdShp = Nothing
    End Sub
    "
    I give up i pasted it direct from notepad inside the code block and it removed line feeds again so here is text.

    OK i marked it solved because i guess the problem is local to those systems.
    i did the close and reopen on outlook On closing it asked if i wanted to save the maacro. I said "Yes" as before.
    On reopening Outlook the Macro option is stil in QAT and works properly. I may need to investigate the systems it failed on because it works fine here. Thanks much for your input giving me enough Hope to try it again here.

    the obvious settings of 50 in height and width are where anyone else wanting this can change it as needed to whatever percent of scale they might need.
     
    questorfla, Mar 21, 2017
    #9
  10. DavidY Win User
    Once I tried saving the macro, closing and re-opening Outlook, it fails for me too! *Sad
    It isn't behaving as it should, because even when I set the Macro security to Notify me, it just does nothing, when it should pop up a dialog or similar.
     
    DavidY, Mar 21, 2017
    #10
  11. I just realized that if i mark it solved so one else can contribute so i changed it back to unsolved in case of other replies and in case i learn further of the reasons. In the various comments above where it may sound confusing: to clarify
    If i paste an image into my post while writing it is extremely small but as soon as I click Post. the image shows at full size on the Board.
    Also: when pasting into the CODE tags I don't know why the line feeds are dropped but it also dropped them the 2nd time so I added to statements inside regular quotes as text,
    Finally, once the Macro is created, it cn easily be added to the Ribbon by selecting Customize the Ribbon with right click and choosing Macros from the list as shown here:

    Changing size of images pasted to email body in Outlook 2016 [​IMG]
    Again, this shows as very tiny while writing this but shows as full size once i click Post Quick Reply
     
    questorfla, Mar 21, 2017
    #11
  12. Added info. The normal ALT+F8 keyboard press brings up the list of macros to run box and allows a keyboard shortcut access. What I would now like to find is the way to make a dedicated keyboard shortcut to RUN the command when pressed.

    DavidY: on the problem: Once I tried saving the macro, closing and re-opening Outlook, it fails for me too! *Smile So far.. So good!

    That is pretty much where I am now and after several restarts I am comfortable that the Macro is staying on-board and working.

    PPS: see this link This is where i ended up on the other systems looing for a reason for the same behavior you got. Same issues. No errors no verbiage as to what is wrong.

    https://social.msdn.microsoft.com/Fo...rum=outlookdev
     
    questorfla, Mar 21, 2017
    #12
  13. Changing size of images pasted to email body in Outlook 2016

    Oh well, back to the drawing board. I found a lot of reasons for various issues but managed to handle them all. Except one.

    As this Macro scales all images (which at first seems a great idea) I just noticed one that doesn't need to be scaled back and should definitely NOT be: The logo in my signature. *Sad As I am a 'newbie' with VBA in Outlook I am not sure if there is code that would exempt items in the signature.

    Even though the signature is a hosted image on a website it still gets the '50% treatment' that I was so glad to have in the body of the email. If you happen to have a solution for this one, please share.

    Other than that, i found that if the image is pasted into an email with pasted objects set to "square" rather than the default "in line with text" this can also cause the VBA to simply do nothing. No errors. No stops. Nothing happens at all. I almost didn't catch this one as this is a setting i have set to 'square' on one system only and as this is a hard to find setting in the first place i had almost forgotten where it is controlled.

    When i remembered how to change it back to the default 'in-line with text' things started working normally for the VBA.
     
    questorfla, Apr 5, 2018
    #13
Thema:

Changing size of images pasted to email body in Outlook 2016

Loading...
  1. Changing size of images pasted to email body in Outlook 2016 - Similar Threads - Changing size images

  2. Outlook 2016 Search Calendar Occurrence body

    in Windows 10 Gaming
    Outlook 2016 Search Calendar Occurrence body: I have a series recurring event in my calendar. I can edit an occurrence to add additional information about that specific occurrence, however, it does not appear to be searchable. I have tried advanced searching, no luck. Also when I use the preview pane, it shows the series...
  3. Outlook 2016 Search Calendar Occurrence body

    in Windows 10 Software and Apps
    Outlook 2016 Search Calendar Occurrence body: I have a series recurring event in my calendar. I can edit an occurrence to add additional information about that specific occurrence, however, it does not appear to be searchable. I have tried advanced searching, no luck. Also when I use the preview pane, it shows the series...
  4. Outlook email bodies suddenly disappear/blank

    in Microsoft Office and 365
    Outlook email bodies suddenly disappear/blank: I have a user running O365 latest version, using Outlook and Exchange (Microsoft 365 Business Standard). Everything was working fine until this afternoon when all the email bodies in his inbox either disappeared, or will only show the first line of the message body. I have...
  5. Outlook - Office Professional 2016 - Change Email Password Not Working

    in Windows 10 Customization
    Outlook - Office Professional 2016 - Change Email Password Not Working: We have recently had to change email passwords with our Yahoo email provider. We know we have the correct new passwords as we can use the web-based mail logins. But we cannot update Outlook to use the new passwords. From the File tab, we select the Account Settings and...
  6. Paste into body of email on windows 10 mail app

    in Windows 10 Software and Apps
    Paste into body of email on windows 10 mail app: Hi Nothing happens when I CTRL-V text into the body of an email on my windows 10 mail app. It will paste into the subject line but not the body of the email. Nothing happens when I right click in the email i.e. no paste options. I am trying to copy text from Word. The...
  7. Change (increase) the font size in Outlook 2016 reading pane

    in Microsoft Office and 365
    Change (increase) the font size in Outlook 2016 reading pane: My tired old eyes, 85 years, no longer can comfortably read emails in the reading pane. How can I increase the size of the font a notch or two? I searched the web but cannot find an answer that will work on my W10 system. Will really appreciate any help on this. Thank you....
  8. Importing Email Accounts Into Outlook 2016

    in Microsoft Office and 365
    Importing Email Accounts Into Outlook 2016: I'm using a new laptop running Windows 10 Pro x64 and I have a subscription to Office 365 Home. I want to import 27 email accounts, 25 of them being Microsoft email accounts, into Outlook 2016. I don't know why, but the import process is not working properly. I first...
  9. Make Outlook 2016 Remember Window Size

    in Windows 10 Software and Apps
    Make Outlook 2016 Remember Window Size: I prefer not to have Outlook take up my whole screen. For some reason, since reinstalling Windows and Office 365, I cannot get Outlook to remember the window size no matter what I do. Things I've tried: control + clicking red X, right clicking on the title bar and choosing...
  10. Make Outlook 2016 Remember Window Size

    in Windows 10 Software and Apps
    Make Outlook 2016 Remember Window Size: I prefer not to have Outlook take up my whole screen. For some reason, since reinstalling Windows and Office 365, I cannot get Outlook to remember the window size no matter what I do. Things I've tried: control + clicking red X, right clicking on the title bar and choosing...