Tags down


How to process SQL results into a CSV/Excel attachment using JCL?

By : Cal Braun
Date : October 17 2020, 08:10 PM
help you fix your problem The sort utility (DFSORT) has the ability to create CSV files through the JFY and SQZ suboperations of the BUILD keyword on the OUTREC statement. I’ll be the first to admit it’s a bit complicated, but IBM performance expert Martin Packer wrote this article 12 years ago that explains it very well. His contrived input data contains four-byte binary fields, but there’s enough basic information in it to use as a starting point.
Your flow would be SQL query->flat file->DFSORT->CSV->XMITIP.
code :

Share : facebook icon twitter icon

VBA Code to save an attachment (excel file) from an Outlook email that was inside another email as an attachment

By : user3687281
Date : March 29 2020, 07:55 AM
around this issue The code below uses this approach to work on the email as an attachment
Tests whether the attachment is an email message or not (if the filename ends in msg) If the attachment is a message, it is saved as "C:\temp\KillMe.msg". CreateItemFromTemplate is used to access the saved file as a new message (msg2) The code then processes this temporary message to strip the attachmnets to fsSaveFolder If the attachment is not a message then it is extracted as per your current code
code :
   Sub SaveOlAttachments()

    Dim olFolder As Outlook.MAPIFolder
    Dim msg As Outlook.MailItem
    Dim msg2 As Outlook.MailItem
    Dim att As Outlook.Attachment
    Dim strFilePath As String
    Dim strTmpMsg As String
    Dim fsSaveFolder As String

    fsSaveFolder = "C:\test\"

    'path for creating attachment msg file for stripping
    strFilePath = "C:\temp\"
    strTmpMsg = "KillMe.msg"

   'My testing done in Outlok using a "temp" folder underneath Inbox
    Set olFolder = Application.GetNamespace("MAPI").GetDefaultFolder(olFolderInbox)
    Set olFolder = olFolder.Folders("Temp")
    If olFolder Is Nothing Then Exit Sub

    For Each msg In olFolder.Items
        If msg.Attachments.Count > 0 Then
        While msg.Attachments.Count > 0
        bflag = False
            If Right$(msg.Attachments(1).FileName, 3) = "msg" Then
                bflag = True
                msg.Attachments(1).SaveAsFile strFilePath & strTmpMsg
                Set msg2 = Application.CreateItemFromTemplate(strFilePath & strTmpMsg)
            End If
            If bflag Then
                sSavePathFS = fsSaveFolder & msg2.Attachments(1).FileName
                msg2.Attachments(1).SaveAsFile sSavePathFS
                sSavePathFS = fsSaveFolder & msg.Attachments(1).FileName
                msg.Attachments(1).SaveAsFile sSavePathFS
            End If
        End If
    End Sub

How To Open and Process Excel Attachment with Exchange Server?

By : Guchachi Santacruz
Date : March 29 2020, 07:55 AM
I hope this helps you . Instead of loading the attachment into memory, you can write to disk using FileAttachment.Load. You would then change your code to the following (untested):
code :
For Each email As MailDT In emails
    For Each a As Microsoft.Exchange.WebServices.Data.FileAttachment In email.Attachment
        a.Load("C:\temp\" + a.Name);


Outlook VBA to save attachment from a mail,and then copy the attachment data in another excel and send the send excel vi

By : Thomas Tsoi
Date : March 29 2020, 07:55 AM
With these it helps For your 1st Problem, see THIS
For your 2nd Problem
code :
FilePathtoAdd = "C:\Users\soumyajitd\Desktop\December\Network Critical Report\Test.xlsx"

With objMsg
    .To = "alias@mail.com"
    .CC = "xx@yy.com"
    .Subject = "Subject"
    .Body = "Body"
    .Attachments.Add FilePathtoAdd
End With

Create excel attachment Object using VB or macros in a cell of Excel

By : makoxsx
Date : March 29 2020, 07:55 AM
wish of those help Here's a sample I created using the method described in my comment:
Excel macro
code :
'Select the cell that should contain the object
'Add an object to the given cell
ActiveSheet.OLEObjects.Add(Filename:= _
    "C:\Users\de12668\Documents\Zeichnung1.vsd", Link:=False, DisplayAsIcon:= _
    True, IconFileName:= _
    "C:\WINDOWS\Installer\{90140000-0057-0000-0000-0000000FF1CE}\visicon.exe", _
    IconIndex:=0, IconLabel:="A sample"). _
Dim myRange As range
Dim longLastRow As Long
Dim counter As Long

Set myRange = Worksheets(1).range("A1")
longLastRow = Cells(Rows.Count, myRange.Column).End(xlUp).Row

For counter = 1 To longLastRow
  range("B" & counter).Select
  ActiveSheet.OLEObjects.Add(Filename:= _
    range("A" & counter).Value, Link:=False, DisplayAsIcon:= _
    True, IconFileName:= _
    range("A" & counter).Value, _
    IconIndex:=0, IconLabel:=""). _

Send an Outlook email with pdf attachment from Excel and disable Outlook attachment context menu

By : user3514728
Date : March 29 2020, 07:55 AM
wish of those help Yes No.
I mean yes, technically it's possible: everything is a window spewing and handling messages, and all it takes is some code to hijack that message pump, intercept the message that says "bring up that context menu", ...and eat it.
Related Posts Related Posts :
  • Value of nLarge and it's item data
  • How to take text from a cell and input it into VBA?
  • VBA is not assigning a certain value
  • Run-time error; Automation Error; Unspecified Error in VBA using UIAutomation
  • Extract span text by next element using CSS Selector
  • What is Proper DAX GROUPBY Syntax In Calculated Column in Power Pivot in Excel in Office 365
  • Extract data from column of selected row in excel vba userform combobox
  • Save as PDF Macro, with dropdown
  • Why empty excel file is 5.5mb large?
  • How do I filter a dataset to matching information in Excel?
  • cell.Value not retrieving the carriage returns in the cell
  • Add in another For Loop in order to have another worksheets data added before the file is saved
  • Recursive Search Through Subfolders BACK to Root Directory
  • Update Chart to include last row data using defined range
  • How to run IW29 with a specific variation and layout and copy its outcome to excel?
  • Color cells right to left in vba loop
  • Please advise to make code more efficient to execute
  • Excel VBA Prompt Message After Sending Outlook Mail
  • VBA "Expected end of statement"
  • Is There a way to recover a severely corrupted EXCEL FILE?
  • VBA: Split sheet on certain rule
  • Excel VBA set default to not split images in two when printing
  • Cannot get the text of nth span element using vba
  • Excel Conditional Formatting For Multiple Matches
  • Cut/paste range of cells into another sheet and send an email
  • VBA runtime error 1004 - vlookup works sometimes
  • Create Column as below
  • Which tool can be used to extract and group rows and do the summation?
  • Find Function in VBA (Excel) won't find the minimum value
  • shadow
    Privacy Policy - Terms - Contact Us © voile276.org