Note that there are some explanatory texts on larger screens.

plurals
  1. POExcel: Combine reformatting and mail macros
    primarykey
    data
    text
    <pre><code>Sub Macro1() ' ' Macro1 Macro ' ' Keyboard Shortcut: Ctrl+q ' Rows("1:6").Select Selection.Delete Shift:=xlUp Rows("2:2").Select Selection.Delete Shift:=xlUp Columns("A:A").Select Selection.Delete Shift:=xlToLeft Rows("1:1").Select With Selection.Interior .Pattern = xlSolid .PatternColorIndex = xlAutomatic .ThemeColor = xlThemeColorLight1 .TintAndShade = 0.499984740745262 .PatternTintAndShade = 0 End With With Selection.Font .ThemeColor = xlThemeColorDark1 .TintAndShade = 0 End With Cells.Select Selection.Borders(xlDiagonalDown).LineStyle = xlNone Selection.Borders(xlDiagonalUp).LineStyle = xlNone With Selection.Borders(xlEdgeLeft) .LineStyle = xlContinuous .ColorIndex = 0 .TintAndShade = 0 .Weight = xlThin End With With Selection.Borders(xlEdgeTop) .LineStyle = xlContinuous .ColorIndex = 0 .TintAndShade = 0 .Weight = xlThin End With With Selection.Borders(xlEdgeBottom) .LineStyle = xlContinuous .ColorIndex = 0 .TintAndShade = 0 .Weight = xlThin End With With Selection.Borders(xlEdgeRight) .LineStyle = xlContinuous .ColorIndex = 0 .TintAndShade = 0 .Weight = xlThin End With With Selection.Borders(xlInsideVertical) .LineStyle = xlContinuous .ColorIndex = 0 .TintAndShade = 0 .Weight = xlThin End With With Selection.Borders(xlInsideHorizontal) .LineStyle = xlContinuous .ColorIndex = 0 .TintAndShade = 0 .Weight = xlThin End With Cells.EntireColumn.AutoFit Rows("1:1").Select Selection.Font.Bold = True Selection.AutoFilter End Sub </code></pre> <p><strong>2nd one</strong></p> <pre><code>Option Explicit Private Sub CommandButton1_Click() sendmail End Sub Public Function sendmail() On Error GoTo ende Dim esubject As String, sendto As String, ccto As String, ebody As String, newfilename As String Dim apps As Object, itm As Object esubject = "Systematic and Manually Created ASN" sendto = "ooooooo@hp.com" ccto = "iiiiiiii@hp.com" ebody = "Hello All" &amp; vbCrLf &amp; _ "Please find the Systematically and Manually created ASN for the last month" &amp; _ vbCrLf &amp; "With Regards" &amp; vbCrLf &amp; "Tarak" newfilename = "C:\Stuff.XLS" Set apps = CreateObject("Outlook.Application") Set itm = apps.createitem(0) With itm .Subject = esubject .To = sendto .cc = ccto .body = ebody .attachments.Add (newfilename) .display .Send End With Set apps = Nothing Set itm = Nothing ende: End Function </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload