outlook

Office addin getAttachementContentAsync failed to load CORS issues

我怕爱的太早我们不能终老 提交于 2021-01-29 19:39:06
问题 I am working on an outlook plugin and I want to send the attachements from an email read item to my backend. I am trying to use the method getAttachementContentAsync for each attached file, but it fails. Here is the error message: Uncaught (in promise) TypeError: Failed to fetch Access to fetch at '' (redirected from '') from origin 'https://outlook.live.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response

Use VBA to tell Outlook to print to a specific printer

≡放荡痞女 提交于 2021-01-29 18:06:31
问题 Is there any way to write a VBA macro in Outlook that forces a printout to a specific printer (even if it's not necessarily the default printer), similar to the Word Application.ActivePrinter = "Printer Name" option? I'd like to create a button that prints the current email and attachments to a specific printer (in this case a PDF printer, but I'm guessing it should be the same principle regardless), but can't seem to find a way to force which printer is used in the code. Thanks. 回答1: No,

MS Outlook Explorer_Close Event

烈酒焚心 提交于 2021-01-29 17:31:22
问题 I have the following code: Option Explicit Public WithEvents myOlExp As Outlook.Explorer ' Initiation Private Sub Application_Startup() Set myOlExp = Application.ActiveExplorer End Sub ' Termination Private Sub myOlExp_Close() MsgBox "quit" End Sub The code itself works fine - with one important limitation (= my problem). The Explorer_Close event is only triggered when multiple Outlook windows are open and these are being closed. However when the last/main Outlook window is being closed, then

Count the number of VBA recipients in the TO field

萝らか妹 提交于 2021-01-29 16:41:05
问题 Is there a faster method to count the number of VBA recipients in the TO field? Please refer to the following pseudo code. Dim myRecipients as Outlook.recipients Dim Recip as Outlook.recipient Dim olToCount as Long olToCount = 0 For Each Recip In myRecipients If Recip.Type = olTo Then olToCount = olToCount + 1 End if Next 回答1: You can also read the To property and count the number of ";" characters, but it is locale specific. What you have is the preferable way; is there a problem with it? 来源

Access sub folder in secondary email account

99封情书 提交于 2021-01-29 14:31:22
问题 I am trying to move emails from the inbox in a secondary Outlook account to a sub-folder in that account. Sub newBox() Dim myInbox As Outlook.Folder Dim myDestFolder As Outlook.Folder Dim myItems As Outlook.Items Dim myItem As Object Dim i As Integer Set myInbox = Session.Folders("Secondary").Folders("Inbox") Set myDestFolder = myInbox.Parent.Folders("Complete") End Sub When I try to set the destination, myDestFolder , I get Run-Time error, An object could not be found. 回答1: You navigated the

Why is my script not running automatically when outlook is started?

自古美人都是妖i 提交于 2021-01-29 14:26:22
问题 This script is in ThisOutlookSession and is only running if I change the functions to Public and run the function manually. I am using Outlook 365. This program scans for emails in an Inbox subfolder and when a new email comes in it downloads the attachment and sends it in an email to a different address. Why is it not running automatically and how do I fix it? Option Explicit Private WithEvents Items As Outlook.Items Private Sub Application_Startup() Dim olNs As Outlook.NameSpace Set olNs =

Excel VBA - Analysing Shared Mailbox Outlook - Run time error 1004: Application-defined or object-defined error

穿精又带淫゛_ 提交于 2021-01-29 12:47:05
问题 I am using the following code in Excel to try to get the details from our shared mailbox into a spreadsheet for further analysis. The code produces a run-time error 1004: application-defined or object-defined error at the point it reaches trying to get the Sender, SenderEmailAddress & SenderName. It is fine when these parts are made inactive and it gets the Subject, ReceivedTime, etc without any issue. Does anyone know what needs to be changed to get that working? Also, does anyone have any

Run-Time Error 287 when retrieving Outlook email properties from Excel

微笑、不失礼 提交于 2021-01-29 10:36:07
问题 I am facing a "Run-time error 287" when accessing Outlook emails via Excel VBA. However, I'm getting this message only when run the script in Office 2013, with an Exchange account assigned to my Outllok client. When running in Office 2019, with my personal Outlook.com email address assigned to the client, it runs fine, doing what is expected to be done. Dim olApp As Outlook.Application Dim olNamespace As Outlook.Namespace Dim olFolder As Outlook.MAPIFolder Dim olMailItem As Outlook.MailItem

Getting calendar's owner email address of an AppointmentItem

穿精又带淫゛_ 提交于 2021-01-29 08:09:22
问题 I'm developing an Outlook Add-In to send all the appointments to a web app and I'm having some trouble consistently getting the "owner" (not the organizer) of an AppointmentItem. For example, X sends an appointment to Y and Z. The Add-In will get three appointment items out of it, I'm trying to get the email address of X, Y and Z. I tried to look into the SendUsingAccount (sometimes set to null) or the Parent property but I can't seem to find what I'm looking for. Thanks for your help! 回答1:

Getting calendar's owner email address of an AppointmentItem

左心房为你撑大大i 提交于 2021-01-29 08:05:46
问题 I'm developing an Outlook Add-In to send all the appointments to a web app and I'm having some trouble consistently getting the "owner" (not the organizer) of an AppointmentItem. For example, X sends an appointment to Y and Z. The Add-In will get three appointment items out of it, I'm trying to get the email address of X, Y and Z. I tried to look into the SendUsingAccount (sometimes set to null) or the Parent property but I can't seem to find what I'm looking for. Thanks for your help! 回答1: