outlook

How to use Interop.Outlook to change print options

邮差的信 提交于 2019-12-25 18:25:15
问题 I would like to use the Interop.Outlook API to dynamically change the Print Options in outlook. For example I would like to change the Memo Style Page Setup to use Letter Size paper with a Landscape Orientation. How can I go about doing this? I have looked at the Outlook documentation and I have not been able to find how to do this. Is this something that can only be done using the registry? If so, would anyone know how I can accomplish this? Thank you very much for your time. 回答1: Outlook

open .msg file using Process.Start()

假如想象 提交于 2019-12-25 16:54:03
问题 ProcessStartInfo startInfo = new ProcessStartInfo(); Process first = new Process(); startInfo.FileName = "OUTLOOK"; startInfo.Arguments = "http:\\blabla.com\EMAIL.msg"; startInfo.CreateNoWindow = true; first.StartInfo = startInfo; first.Start(); i used Process.Start to start up Outlook and open a .Msg file. how can i reuse the same process to open another .msg file without opening multiple processes/threads/instances of outlook? i have tried something like Process[] outlook = Process

open .msg file using Process.Start()

南笙酒味 提交于 2019-12-25 16:53:47
问题 ProcessStartInfo startInfo = new ProcessStartInfo(); Process first = new Process(); startInfo.FileName = "OUTLOOK"; startInfo.Arguments = "http:\\blabla.com\EMAIL.msg"; startInfo.CreateNoWindow = true; first.StartInfo = startInfo; first.Start(); i used Process.Start to start up Outlook and open a .Msg file. how can i reuse the same process to open another .msg file without opening multiple processes/threads/instances of outlook? i have tried something like Process[] outlook = Process

Outlook add reference from file

梦想与她 提交于 2019-12-25 16:48:36
问题 I created a macro in Outlook which needs Word and Excel references. It has to work on different versions of Office (2007, 2010, 2013). I have Office 2013, so when I "install" macro (copy VBAProject.otm) on 2007 and 2010 I have missing references. I wanted to add references manually using code similar to this in Excel: ThisWorkbook.VBProject.References.AddFromFile but I couldn't find anything like that. I searched internet, but I also failed. Can anyone tell me if in Outlook VBA is possible to

“Unsafe attachments” prompt in Outlook on outgoing mail

笑着哭i 提交于 2019-12-25 15:55:42
问题 Plenty of info on incoming unsafe attachments but I've yet to find one that addresses my query on outgoing Outlook items. I'm running a script that's sending large volumes of emails over Outlook and ideally i'd like to let it chug away all weekend: however last time I tried it got stuck when Outlook gave a prompt asking if I was sure I wanted to send the message since it might contain attachments that were unsafe. It's very inconsistent: probably one in a thousand emails causes this and it

“Unsafe attachments” prompt in Outlook on outgoing mail

♀尐吖头ヾ 提交于 2019-12-25 15:53:29
问题 Plenty of info on incoming unsafe attachments but I've yet to find one that addresses my query on outgoing Outlook items. I'm running a script that's sending large volumes of emails over Outlook and ideally i'd like to let it chug away all weekend: however last time I tried it got stuck when Outlook gave a prompt asking if I was sure I wanted to send the message since it might contain attachments that were unsafe. It's very inconsistent: probably one in a thousand emails causes this and it

Replace a string in a sent email

a 夏天 提交于 2019-12-25 14:46:41
问题 The following code creates and sends a simple email. After the email is sent it replaces a string in the email body. My code works when I use the debugger’s single-step feature to execute the code. It also works when I add a MsgBox instruction with a “click to continue” button after the objMsg.Send instruction. It does not work when I execute the macro without interruption, but tells me that Outlook cannot save an email to the folder when a macro is running. Sub CreateNewMessage() objMsg As

Send email on click of button with html email

十年热恋 提交于 2019-12-25 14:23:19
问题 I have a question related to mailTo feature of HTML that I need in outlook. What I need is initially a system sends me email that has HTML content in it with buttons. On click of one of the buttons, an automatic email should be generated and sent to a recipient. We can do this in 2 step process autofilling the recipient address, subject and body and user can just click send. But I would like to avoid that second step of clicking send again. Can I do this using any script or macro and embed as

Send email on click of button with html email

风流意气都作罢 提交于 2019-12-25 14:22:01
问题 I have a question related to mailTo feature of HTML that I need in outlook. What I need is initially a system sends me email that has HTML content in it with buttons. On click of one of the buttons, an automatic email should be generated and sent to a recipient. We can do this in 2 step process autofilling the recipient address, subject and body and user can just click send. But I would like to avoid that second step of clicking send again. Can I do this using any script or macro and embed as

VSTO Outlook add-in, does UI manipulation need to be done from main thread?

本小妞迷上赌 提交于 2019-12-25 14:04:27
问题 I'm maintaining a VSTO add-in for Outlook, and it has a BackgroundWorker that handles syncing with a server. I want the worker to trigger user errors in the UI (changing the picture on a button, enabling a message in a settings window). Does UI manipulation need to be done from the initial thread? This StackOverflow answer says not, but a comment on it says so. It's for Excel, but still for a VSTO add-in. I tried and it seems to work from either thread, but there could be a race condition I