Tips for changing the code examples The following subroutine sends the visible cells in the selection in the body of the mail without pictures.
Screen Updating = True Coz i could never really honestly see the difference Additionally, Workbook 1 where the code is written actually opens up another Work Book which stores the results.
No matter what i do, the Results workbook shows up on the screen, and i can see the screen updating and flickering happening when the cells are getting updated I want to find out a way to avoid this and speed up my macro Hi Mark, I have done that but to no effect.
You only have to change the mail address in the macro and select a few cells before you can run the macro.
If you use Office 2002-2016 see this page for an example with pictures.
I created the code below which does what it was written for, BUT the screen updates whilst it runs. Echo as a solution, but that is not recognised in Word 2007?
The screen flickers (presumably when opening each document)? Sub Insert Text() Dim Shp As Shape, Doc As Document, str Text To Insert As String, str Text To Find As String Dim i As Long, doc To Open As File Dialog, s Hght As Single Dim rng To Search As Word. Data Object On Error Go To Err_Exit 'str Text = Input Box("New Text", "Header Textbox Update", "New Text") ' Switch off the updates of screen Application. File Dialog(mso File Dialog File Picker) doc To Open. File Dialog(mso File Dialog File Picker) If doc To Open. Range Dim o Frm As frm Progress Dim Portion Done As Double On Error Go To Err_Exit str Text To Insert = "Annual bonus rates for the last five years" str Text To Find = "Discharge Pack" Set doc To Open = Application. Sub Insert Text() Dim Doc As Document, str Text To Insert As String, str Text To Find As String Dim i As Long, doc To Open As File Dialog, s Hght As Single Dim rng To Search As Word. Remove the line indicated to search for every instance. Publish (True) End With Set fso = Create Object("Scripting. Close Rangeto HTML = Replace(Rangeto HTML, "align=center x:publishsource=", _ "align=left x:publishsource=") If you want to add a few text lines above the HTML body you can add this to the macro.