I want to send multiple msg files stored in a specific folder with one Excel button.
I am making a tool to send invoices to multiple customers.
We have done so far to create a msg file that sends a PDF file of an invoice to each recipient, but please tell me the code to send the msg file all at once.Applicable source code Supplemental information (FW/tool version etc.)
Answer # 1
I'm done now.
The basic design is the same as the reference site.
"Set msg = oApp.CreateItemFromTemplate (msgname)"
In this part of the code
Open multiple msg files stored in a folder
I think that can be solved.
Sub SendMsg () 'Set path * In the format that suits your source! Dim msgname As String msgname = "C: \ pass name \ file name.msg" '' Outlook variable initialization Dim oApp As Object Dim msg As Object Set oApp = CreateObject ("Outlook.Application") Set msg = oApp.CreateItem (olMailItem) 'Set msg file and send Set msg = oApp.CreateItemFromTemplate (msgname) msg.Send 'Variable release Set olApp = Nothing Set msg = Nothing End Sub
Personally, with this function as an argument "array containing the path",
If the specification is to loop the part of '' msg file set and send 'by the number of array elements
I thought it was easy to use.
* It may be strange to open the msg variable for each email ...
- [excel] vba that automatically sets the posting destination to the next line when automatically posting with a macro
- i want to extract the contents of multiple excel sheets with vba and store them in sql server
- all excel files in vba folder are not output as pdf
- [ie operation with excel vba] i can't get data from multiple pages by turning the pager
- vba - how to get an excel workbook that opens automatically after downloading automatically
- i want to extract multiple excel books in the directory with vba, store them in sql server, and register them
- vba excel want to select multiple non-consecutive rows and change the format
- in excel vba, the aggregation macro of data from multiple books has stopped working
- c - about reading multiple files
- single quotation when updating data in excel vba database
- excel vba i want to draw continuous shapes
- how to name and export multiple csv files in swift
- how to name and share multiple csv files on swift5
- i want to search and paste it with excel vba-find
- vba - how to display an image url in excel as an image in excel
- vba - when creating an excel drop-down list, i want to use the definition of the name in another book as a list
- python - how to group excel files with pyhon
- vba - only post unposted data from one excel book to another book
- get files in vba subfolder
- vba - why dir files are not updated
- Excel does not display pictures
- vba - compile error correction candidate: about the end of the statement
- i'm studying vba i did not understand even if i looked it up, so i will ask you a question
- excel vba causes automation error when duplicating sheet
- working with windows apis in vba:about the type in the 64-bit version
- vba - i want to use a class module to link checkboxes of any number of automatically generated ole objects
- i want to switch the vba specified range cells vertically and horizontally
- conditional branch when there is no deletion record in excel vba
- vba - i want to display the last day of the newest month from multiple dates
- vba - dir function open a file with an arbitrary number of digits using a wildcard