Open a web browser as a pop up window from Outlook - vba

I have an outlook macro that triggers when the user clicks a button in the ribbon.
When clicked, the button sends data regarding the open email to my server via a post request (subject, to, from, etc.).
After that request is sent, the macro opens a webpage in the user's default browser using this code:
Shell "explorer.exe " & domain & "/create-new-matter/from-outlook/" & EntryID & "/from_outlook/"
The user can categorize the email in that page (covert the email into a deliverable and assign the deliverable).
Unfortunately, this way of doing things causes the user to constantly switch back and forth between the browser and outlook.
Instead, I would like to launch the webpage within a popup window that appears on top of Outlook itself, similar to how a MsgBox would appear on the user's screen.
Is there a way to do this?
Thanks in advance!

Related

Outlook Add-In to Save Emails After Sending

I'm looking to create an Add-In for Outlook that allows users to save emails, which are saved against a company in our system. Currently this works by the user opening an email and clicking a button I've created which opens the taskpane containing a form (which asks the user to select a company against which the email will be saved, and optionally provide an email description), whereupon pressing 'save' the email's ID and other relevant information are sent to an API which fetches the email from the rest API and saves the file in our system.
This technically works, though ideally I would like some functionality along the lines of:
User sends an email
my add-in to ask the user if they want to save the email immediately after they sending
If 'yes' is clicked, for the email saving form to appear in either the taskpane or a separate window so it can be saved
This is simply so they don't have to navigate through to their sent messages after sending and save them manually.
Currently I have tried using the ItemSend event for this, however it seems this is more for appending things to the email before it sends rather than after, and I don't seem to be able to use this event to get the email item or its ID. I had thought about potentially using the event to send the email to a custom mailbox and have it save as a result of this using a flow of some kind, however I think this would be rather difficult to implement due to needing user input to save the email in our system.

VBA IE 10 Automation - Automatically Save PDFs

I'm trying to automate the process of saving PDF invoices for bookkeeping purposes. The method suggested here does not work because a login is required to access the invoices.
I currently have a macro that navigates to the page, logs in and opens the links to each invoice. The URL scheme for these invoices is .../account/invoice/?invoice_number=XXXXXX. Navigating to each of these URL brings up the files in the
window. I would like the files to automatically save, but according to this page, the Always ask before opening this type of file option was depreciated from IE 10 and 11 due to security reasons.
I attempted to automatically click Save using this method, but the code here seems to be for a different version of IE.
The line:
hWnd = FindWindow("#32770", "File Download")
was modified to:
hwnd = FindWindow("#32770", "View Downloads - Windows Internet Explorer")
This successfully captures the download window, but it fails to find the &Save button for me to click. My guess would be that it's because there are multiple save buttons.
Any ideas would be greatly appreciated! Thanks.

Opening a url in a specific web browser when clicked - VB.net

I'm trying to figure out a way to have a specific web browser open (Internet Explorer for example) when a URL is clicked using VB.net
As I have it now, my code creates and sends out an email that displays a title and a hyperlink for the user to click on. Right now, the hyperlink opens the default browser, but I want to make it always open Internet Explorer.
The code below is what I have for displaying the Hyperlink. It displays "View Document" and the prints the hyperlink underneath. The hyperlink in this case is stored in my LinkLabel since its already part of the application somewhere else
What do I need to add to the code so that it defaults to Internet Explorer when it is clicked?
I have come across suggestion of using the full file path to Internet Explorer on the C: Would that work?
<a href=microsoft-edge:http://example.com>my link</a>
Update:
... & "my link" + ...

Multiple E-mail preview

I need to send multiple e-mails but I want to check content before sending them.
To do this I tryed by using WebBrowser and a MsgBox confirmation but I can't scroll the WebBrowser as long as the MsgBox is displayed.
I also tryed by using WebBrowser into another Form but I wasn't able to pause-resume the loop for sending e-mails.
Can anyone suggest me the correct way? (if possible with a sample code or a tutorial link)

How do I send an email and close the current inspector from within an Outlook form region?

I have an outlook 2010 AdjoiningFormRegion that contains a single button. The idea is that a user composes an email then clicks my send button instead of the usual outlook send button. My send button will communicate some info to a web service then send the email as usual and close the inspector window? Is this even possible? It would be great to hook into a send event but I've had no luck figuring this out.
The Send method of the MailItem class will send the email and close the window just as clicking the Send button does.
(Globals.ThisAddIn.Application.ActiveInspector().CurrentItem as MailItem).Send()