outlook-vba

Forward a highlighted email to a specific recipient

佐手、 提交于 2019-12-12 01:56:08
问题 How do I forward a highlighted email to a specific recipient? Is it possible to link that to a CTRL-ALT- shortcut? I'm on Windows 7, Outlook 2010 回答1: Ctrl+Alt does not appear to be a feature of Outlook 2003 so I cannot comment on it. I can run the following macro by adding the macro to a toolbar using Tools, Customise. This macro will forward all selected items. If you want to ensure only one item is selected, test SelectedItems.Count. If the current folder is empty, nothing happens because

VBA outlook - retrieve email address from excel as recipient

和自甴很熟 提交于 2019-12-12 01:47:12
问题 I would like to retrieve the email addresses from excel cells and copy them as recipients on outlook. However, the "To" and "CC" on outlook are empty. input and output: Cell A1 is the email address which I want to "send to" . Cell A2 is the email address which I want to "CC to" . my VBA code: Sub Button1_Click() Dim OutApp As Object Dim OutMail As Object Set OutApp = CreateObject("Outlook.Application") Set OutMail = OutApp.CreateItem(olMailItem) On Error Resume Next With OutMail .To = Cells(

Send method not working when using Word Editor

允我心安 提交于 2019-12-12 01:47:08
问题 I have a rule that whenever I receive an email with a specific word in a subject line, it will trigger this script. The script will forward the email to the specific user in the subject line and use the word editor to delete the first line of the email body and change it to "Hi,". When I use .Display method then manually click send it is working fine, but whenever I use .Send method, the outlook won't update/receive the email in the mailbox and won't forward the edited email. I need to close

Send individual emails to predefined set of people with all files in a folder

半腔热情 提交于 2019-12-12 01:23:16
问题 I have a bunch of files that get updated in the folder "C:\Email". These are PDF files that are created on a weekly basis. This could number from anywhere between 50 to 500 or more files. The file names are random. I need to send out these files individually to three addresses say a@a.com,b@b.com and c@c.com. I cannot send all the files in one go, they need to go individually. The subject will be the name of the file and the body will remain the same - "Please find attached file. Thanks and

ActiveSheet.MailEnvelope

风流意气都作罢 提交于 2019-12-12 00:32:34
问题 have been trying to send email with vba , but i ran in to an unusual problem with the mail envelope, and have seen lots of unanswered problems with this delicate object. I have discovered through debugging that it locks up when trying to send following code, one problem i resolved was that I needed a range to be selected. BUT now it is locking up cos i am sending a message with the from field empty. if i add a break point, add the field manually then resume all goes well, but i cannot find

Save specific file type as attachment with received date time

你。 提交于 2019-12-11 22:24:23
问题 save only images to a folder i.e .jpg .jpeg .gif .png Include the received date rename all saved image filetypes to ".jpg" I have most of it down. It is saving files like this: test.jpeg.jpg and test.jpg.jpg Public Sub saveAttachtoDisk(itm As Outlook.MailItem) Dim objAtt As Outlook.Attachment Dim saveFolder As String Dim dateFormat As String Dim strFileExtension As String saveFolder = "C:\emails\" dateFormat = Format(itm.ReceivedTime, "yyyy-mm-dd Hmm ") strFileExtension = ".jpg" For Each

how can i handle the attachment of an attachment?

时光总嘲笑我的痴心妄想 提交于 2019-12-11 22:20:12
问题 I am automatically processing emails in a certain inbox. However our suppliers should send emails to that inbox with one pdf-attachment. and this pdf-attachment should be saved to a certain folder - no problem so far. But: one supplier is sending emails that only contain another email as attachment and only in that "sub-email" the pdf is to be found. For some reasons he is not able to change that. Now it does not seem possible to use that attachment of the attachment as mailitem: Set objMail

VBA Macro - customize Reply Button

一世执手 提交于 2019-12-11 20:11:44
问题 I've written a macro to add BCC address on reply window. But I want to do the same on click of 'Reply' Button. I can not add macro to this button as it is not custom button. How should I do this? 回答1: You can repurpose built-in controls. But in that case you need to develop an add-in, not a VBA macro. See Temporarily Repurpose Commands on the Office Fluent Ribbon for more information. Also you may try to handle the ItemSend event of the Application class which is fired whenever an Microsoft

GetInspector is not replacing Display to generate signature

一个人想着一个人 提交于 2019-12-11 17:05:17
问题 I am working with an application that generates emails and send them through Outlook. I have used the GetInspector trick to get the auto signature from Outlook. The trick does not work after the summer 2017 update of Outlook. I now only get the signature by calling MailItem.Display. Any ideas on how else to get the signature? 回答1: MailItem.Display is now the only way. If using Redemption is na option, you can also use RDOSignature. ApplyTo method. And of course you can access the signature

Make Outlook Task item through Excel Button

 ̄綄美尐妖づ 提交于 2019-12-11 16:56:03
问题 I want to make a simple program in which I can create an Outlook Task. User fills in data and clicks the create button. I found the following code online and it should work, but it doesn't. No task is added in my Outlook, but no error is shown either. I have the feeling it somehow goes wrong with adding the recipients of the task. Any clue why I don't get an error but, no tasks are added? Dim OutApp As Outlook.Application Dim OutTask As Outlook.TaskItem Set OutApp = CreateObject("Outlook