I would like to send a command from an external app to Outlook via OLE to open a particular message in the native viewer. I have the EntryID of the message. Does anyone know how to do this? I have searched around and have been unable to find any guidance.
Something like the following (VB script) would do the job:
set App = CreateObject("Outlook.Applicatiobn")
set NS = App.GetNamespace("MAPI")
NS.Logon
set Msg = NS.GetItemFromID(YourEntryId)
Msg.Display(true)
Related
Can somebody please advise on how to send a message to a channel with several files attached? I successfully uploaded files to slack, but having issues formatting my message.
I tried markdown message with <file1.permalink| > <file2.permalink| > but it looks ugly with silly (edited) note
What I'm trying to achieve is for my message to look the same way, like when I send a message with files through the Slack client, with no stupid (edited) note
Thank you in advance!
I'm trying to build a graphic interface for a discord bot I wrote using discordjs.
However, I encountered a problem with sending image.
This is the part of my code responsible for sending a message to a user :
utilsateur.createDM().then(channeltemp => {
let attachment = new Discord.MessageAttachment('./image.png');
channelDM = channeltemp;
channelDM.send("message", attachment);
});
The image "image.png" is located in the same folder as the script. I've been running my script on nodejs without any problem, however when I tried to run the script via the html page of my electron app, I'm getting this error :
Uncaught (in promise) TypeError [REQ_RESOURCE_TYPE]: The resource must be a string, Buffer or a valid file stream.
I think it has nothing to do with pathing because I tried changing my path (absolute, relative, ...) without any success and moreover, I'm able to access some data in an excel in my electron app.
Does anyone have a clue about how to solve my problem ?
I'm sorry if I made some mistakes about technical terms (I'm a beginner) or even grammatical mistakes as English isn't my native language.
Appreciate your help ! :)
I am not really sure where the problem is, either it's on the declaration of attachment or channelDm.send. But according to my recent discussion with some people in my Discord server, It would have been caused by not giving the whole path of the local data, which in your case, you're giving a relative path of ./image.png, assuming the error was in the declaration of attachment.
You might want to try putting full image path on the first argument of MessageAttachment constructor if you're using NodeJS.
const path = require('path');
const fileName = 'image.png';
utilsateur.createDM().then(channeltemp => {
let attachment = new Discord.MessageAttachment(path.join(__dirname, fileName));
channelDM = channeltemp;
channelDM.send("message", attachment);
});
__dirname is, quoting from NodeJS documentation:
<string>
The directory name of the current module. This is the same as the path.dirname() of the __filename.
I hope this both answered the question and fixes your problem. I have to apologize in advance if it doesn't, I'm also a beginner and currently just started using DiscordJS after migrating from Discord.py.
I'm just gonna edit to say that I solve my problem by splitting my code in half and executing one outside the electron app using a cmd command.
Thanks for helping !
Trying to automate some things with Microsoft Outlook, but a login prompt is giving me troubles.
Dim objOL, outlook_NS
Set objOL = CreateObject("Outlook.Application")
Set outlook_NS = objOL.GetNamespace("MAPI")
outlook_NS.Logon "username#email.com", "password", False, True
This code here attempts to start Microsoft Outlook, but I get prompted with a Windows Security popup to enter my username and password. I thought the Logon was used for this purpose but it appears it's not. Anyone have any ideas?
I'm trying to log in on a Citrix server, so it's necessary to provide login information as it won't have a Default profile setup.
The prompt looks like this:
Update: I did some further testing and here's what I believe to be happening, the line
Set objOL = CreateObject("Outlook.Application")
Doesn't complete execution until we log in with that prompt. With that being said, I don't see a way we are going to be able to accomplish this because the prompt is created from that line of code, but once we hit that line of code we are stuck "in limbo" until either a timeout or we log in.
Firstly, Namespace.Logon takes the name of an existing profile, not an email address. One way or another, a profile must be created before you can use Outlook.
I have problem with launching Google-Cast application similar to sample CastHelloText-chrome. I slightly modified example code for my specific purposes. The goal for creating this application is to send and show image data directly in Chromecast device.
Particularly the difference between official sample and my code is in message format and its content, sent by sender application. Sender application took png image coded by base64 and send through message bus with custom namespace. Receiver application get this message and use this as data source for html object <img>.
Error appears when I do this steps:
Reload sender page, checking console if any device found.
Send the form by just pushing enter on input box (text is ignored).
Now a popup from Chromecast extension shows. Next there are two scenarios:
3a) I confirm casting to device by choosing one from the list, then I get this error message in console:
onError: {"code":"channel_error","description":"Error: Timeout","details":null}
3b) I just click somewhere else, I get this error:
onError: {"code":"cancel","description":"User closed popup menu","details":null}
Both of errors are caused by calling function chrome.cast.requestSession in chromehellotext.html at line 161, but what's really wrong I don't know.
When I step sender script I realize that function sessionListener is never called. I know that something go wrong when code try to call chrome.cast.requestSession, where described error raises. So I need help if I missed about right way to use Google-Cast API or If this problem has something to do with networking issues.
Receiver application is registered on Google Cast SDK Developer Console and I'm testing on registered device with some serial number. I'm using Google Chrome in version 42.0.2300.2 canary (64-bit) and Chrome version 40.0.2214.111 (current stable I suppose). For testing I also tried to turn off Windows Firewall entirely but with no luck.
Edit:
There were some syntactic errors that caused error message described above.
It seems like you are trying to use the data/control channel to send an image; please don't do that; that channel is not meant to be used for large data communications; in fact it cannot send anything which approaches or exceeds 64k. If your goal is to send images from your local machine, you would need to run a local web server on your local machine and serve images through the web server.
For and easiest tutorial you can have a look to this tutorial.
It is well explained in this tutorial.
Chromecast Sender application
There is no need to maintain session by yourself.
just add button and enjoy casting
mCastManager.addMediaRouterButton(mediaRoutebtn);
I found a source of my problem. There was something wrong in receiver code - syntactic and runtime errors, so I must admit that my code wasn't functional. Now its working in terms of launching application and getting session.
Unfortunate thing is that the error message generated by Chromecast extension didn't match the actual error - at least it was a bit confusing when I didn't know what's really happening on receiver side without ability to debug the code.
I have installed Exchange server version 2013. Then I tried to create and connect to the server using MFCMAPI tool manually. While login to the message store it throws the following error
"Error:
Code: MAPI_E_FAILONEPROVIDER == 0x8004011D
Function CallOpenMsgStore( lpMAPISession, (ULONG_PTR)m_hWnd, lpEntryID, ulFlags, (LPMDB*)lppMAPIProp)
File MainDlg.cpp
Line 437 "
And i had gone through to the article given below and followed the instructions given in the same. But, now also i get the same "MAPI_E_FAILONEPROVIDER == 0x8004011D"error as before.
link : http://blogs.msdn.com/b/dvespa/archive/2013/05/21/how-to-mfcmapi-create-mapi-profile-exchange-2013.aspx
Please help me to resolve my problem.
Problem:
You will get this error message if the Outlook profile is in the Cache mode.
Solution:
On the client computer, open the Control Panel and click the Mail icon.
Open the <Profile>, click the email account and select the related <Account>.
Click Change.
Verify that the Use Cached Exchange Mode box is unchecked.
Exchange 2013 only allows ROH (RPC-over-HTTP) connections. See http://blogs.msdn.com/b/dvespa/archive/2014/01/16/create-outlook-profile-exchange-2013.aspx and http://blogs.msdn.com/b/dvespa/archive/2014/01/17/how-create-outlook-profile-office-365.aspx for the steps on how to create ROH profiles.
I had a similar problem and found that the link on dave vespas blog is pointing to an old version of mapicdo.
Make sure you have the latest version of mapicdo & mfcmapi and try again.