Configure Outlook Mail Settings Programmatically? - visual-studio

Was wondering if there was a simple way to add and configure a POP3 server to Outlook's mail server settings programmatically?
Searching Google seems to yield results that tell me I have to reverse-engineer the gobbledygook stored under HKCU\Software\Microsoft\Windows NT\Windows Messaging Subsystem\Profiles. My employer wanted to see if it was possible to quickly bang out a program to configure our users' POP3 settings (we're spread out around the country) and so far this is looking anything but simple.
I have VS2008 and all the Windows/Office built-in scripting tools at my disposal, though I don't know a lick of C++ (only C, C# and some web/linux stuff, I am self-taught).
Does anyone know of a simpler way to access Outlook's mail profiles in order to add to or tweak them?
Thanks!
Tom

Outlook supports the PRF file as a means to add/configure mail accounts:
http://technet.microsoft.com/en-us/library/cc179062(office.12).aspx
You could distribute the file itself to your users, or write a utility to create it and open it with Outlook.

The easiest approach is to create an AutoIt script to perform the changes through the front end. That way you don't need to reverse engineer anything. It's usually the quickest and easiest approach to making a change. After the script is good to go, compile it and distribute it. Have the end users run the application and they're done.

Related

An Outlook Tasks ToDo list in PowerApps (or something else)

I want to somehow create a To Do list in PowerApps, that connects to Outlook Tasks. It is avaliable as a
data source in PowerApps, so should be possible.
I want it to be shareable. The new Microsoft To-Do app is not, so can't use that. At least not yet.
EDIT 2018-05-15: Rather go directly to the answer given here, than read the rest, if you want to make a shareable To Do list that integrates with Outlook Tasks!
There is already a To Do list template in PowerApps, but it is built on Wunderlist and I do not want this (because I can't
see how Wunderlist can connect to Outlook Tasks). Good thing is Wunderlist is shareable, though.
Nevertheless, I am trying to start with the Wunderlist template, and replace all Wunderlist calls with appropriate Outlook Tasks calls; e.g.
UpdateContext({MyList:Wunderlist.RetrieveLists()});;
with something like:
UpdateContext({MyList:OutlookTasks.GetAllTasks(...
Anyone gone through this is welcome to give a hint. I have scanned through the Internet for any instructions, or a book, but as always
I find nothing. But I know this is all so new yet.
Or else, is there another way to go?
I finally found a way to accomplish this. But no, the PowerApp way is not the easiest way to go (at least yet). I edited the title.
Better to use Planner and Outlook Tasks, and create a group in Microsoft Teams.
In Teams, you can easily add Planner to the tabs, and it at once gives you a To Do option. You can select exactly those people should see the list
(member of the team: all of them , some, or only yourself). It works well on the mobile, too.
At the time of this writing, an integration Planner - Outlook Tasks is not yet implemented
by Microsoft, so for now we can follow Avem Evolution's excellent videos (using Flow):
https://www.youtube.com/watch?v=FytBrdPHH-A
Matt Soseman's article is very useful too:
https://blogs.technet.microsoft.com/skypehybridguy/2017/08/30/microsoft-teams-using-planner-to-stay-organized/

Downloading pop3 mail attachment with vbscript

I am looking for a way to automatically download an email attachment from a pop3 account on a Windows Server 2008. I am limited to using default Windows technology to solve this problem (i.e. not installing additional software or scripting environment).
So far I have selected vbscript as a scripting solution, but struggle with the access to pop3 account. As far as I understood I could use ActiveX/COM or another dll to extend the functionality. Since another dll would mean additional software, this solution is not feasible.
To all you vbscript(-ing) professional: Could you provide an example or a hint on how do solve this download problem with vbscript?

Does Windows, Outlook, or Exchange have an API for reading iCal format?

I'm trying to add iCal import support to my existing scheduling application which needs to support Windows XP, Vista, and 7. Writing iCal format is easy, but reading it is another story, mostly trying to convert times to local times with the complex TIMEZONE/TZID/RRULE syntax. Ideally Windows would have a native API for this, but I haven't found one.
I know Outlook 2007+ has an OpenSharedItem function that would work. I don't want to require users to have Outlook installed though, since my application "competes" with Outlook. I thought about writing a web service that would use Outlook on my web server to do this, but I know using Outlook OLE/COM objects from a service has issues, so that probably isn't an option either. I do own about 300 Exchange Server licenses, are there any APIs with Exchange that would maybe work better? I do notice when I email iCal files from GoToMeeting.com they say they were created with "Microsoft CDO for Microsoft Exchange", so I have a feeling they are doing something like this to avoid writing the format themselves.
My application is written in C++ using mostly native Win32 API, but I don't mind creating a .NET DLL for this, or even requiring users to have Internet access so I can post the file to my web server and have it return a converted format my app can use easily. My web server runs on Windows though, so anything Unix-based might be dificult. Other than that, I'm pretty open to options.
Update: I did find CDOEX but as I've never used it before, can anyone tell me where to start and if it can in fact do what I need? I don't really see much about iCal in the docs, and I'd need to install Exchange on my dev PC (not crazy about that) to start playing around with this API.
You can try to use Redemption (I am its author) - it allows to explicitly import iCal files using RDOAppointmentItem.Import(..., olICal).

WP7: How to open file in my app from the browser or mail client?

Is it possible to register a file extension specifically to my app so that I can download and open it from the mail app or the browser?
Adobes Pdf-Reader can do this so I suppose it is possible but maybe there is special plumbing involved we have no access to.
For a regular 3rd party application, you can't. There's a trick, using the Web Browser Task for the purpose.
But it'll only work for file-extensions known to the system.
Unfortunatly, that is a feature not available to the general developers, as I'd bet Adobe Reader uses some sort of Interop to achieve that (and Interop is NOT open to developers)...

Create a windows service in vb6

Is it possible to create a windows service in vb6? if yes, how?
I've never tried it, but Desaware offer a commercial package, the NT Service Toolkit that claims to allow you to host a VB6 DLL inside a Windows Service. Desaware was founded (and I think is still owned by) VB6 guru Dan Appleman, which is a good recommendation.
Microsoft created a control to allow you to create services in VB6.
http://support.microsoft.com/default.aspx/kb/170883
http://support.microsoft.com/kb/175948/EN-US/
Yes, it works, is it the best way to create a service, no, but if VB6 is a requirement (you have a bunch of code you have to re-use), then I can state from experience that it works. We have the original control from the January 1997 MSDN, however you can easily find it on the net if need be ( http://www.google.ca/search?q=ntsvc.ocx+download )
Like gouging your own eyes out with a spoon, it is technically possible but I wouldn't recommend it.
Yes, you can. Just follow the directions in this tutorial:
http://www.vbrad.com/article.aspx?id=92
To answer your question, yes it is possible to create a Windows service with VB6. To offer you advice, there are much better tools to use. I did it once as a proof of concept project, but never liked it well enough to try to use it for anything that we used in the company. A co-worker did do this for a production app and it was error prone. After he left we found out just how hard he was working to keep his service running and ended up replacing his app without reviewing his code. So my advice is, if you want to do it as an exercise go ahead, but if you are looking at this for a workable solution you should consider other tools. Here is a link to one way to do it.

Resources