Is there an event available in Office.js which notifies the office addin when the word/excel document closes. I want to implement a scenario where if the user closes the word document (where the taskpane addin is added) the user is shown a custom message before the word/excel document closes.
That event is not supported in Office.js. But it's a good idea. Please go to Office Developer suggestion box and search for "word events". Vote up any suggestions that match your needs, or create a new suggestion.
Related
I have my own plugin written for Outlook MAPI in C++.
We have our own server code and client interacts with it using SOAP Req/Resp.
Now when we have Microsoft Teams installed on the PC. If someone opens Outlook, and goes to Calendar, it shows "New Teams Meeting" button on "Home" ribbon. If someone clicks it. It opens the new meeting compose button but on shows message box with error "We couldn't schedule the meeting. Please try again later". Once we click OK on that message box, it closes the compose windows and returns to the main windows.
But it works perfectly when someone follows path : Ribbon Home->New Items->Meeting. Now it opens new meeting compose windows. Now on the new meeting compose windows Ribbon Meeting->Teams Meeting and it perfectly works fine by adding Teams Meeting URL at the bottom in body.
Any idea what could be the problem? What's missing there?
Thanks in advance
Check whether this problem is related to the Teams add-in, see Teams in Outlook: We Couldn’t Schedule the Meeting.
I have an addon in Outlook which adds warning to mailbody and links in the email when email is coming from external or untrusted sources.
Anyway, when I replace something in body, when email is opened in full view (no reading pane, double click full view of mail item), I hook mailItem close even and I discard changes, everything works well. (mailitem.onclose(olDiscard))
When I do this with reading pane on, when I discard the changes, Outlook still either saves the changes or when user is trying to close Outlook it asks user "Do you want to save changes to ....." and if user clicked on multiple emails during this period, it shows popup question for ALL emails user clicked and we replaced its body.
What's the solution here? What can I do to fix this? I want to make changes to link and to body, but discard them when user clicks away on another email. End goal is not having Outlook to ask user "Do you want to save changes ..." popups. Please advise.
I can't also make changes to inspector, because inspector is read-only.
P.S. plugin is written in C++.
The solution is to avoid modifying the message body if you do not want to keep the changes.
If you want to show a warning to the user, add a task pane to the inspector. Or simply stamp the message with a category - it will be shown in the inspector.
The Outlook object model doesn't provide anything for handling hyperlinks clicks. As a possible workaround you may consider implementing the following functionality:
When the item is selected or opened in Outlook you may replace the original URL with your own where you can pass the original URL as an encoded parameter if needed. So, if it is allowed to open the URL you can redirect the request further. Note, you can use the SelectionChange event of the Explorer class which is fired when the user selects a different or additional Microsoft Outlook item programmatically or by interacting with the user interface. This event also occurs when the user (either programmatically or via the user interface) clicks or switches to a different folder that contains items, because Outlook automatically selects the first item in that folder. However, this event does not occur if the folder is a file-system folder or if any folder with a current Web view is displayed.
Also you may consider handling the Open event of Outlook items which is fired when an instance of the parent object is being opened in an Inspector. When this event occurs, the Inspector object is initialized but not yet displayed. The Open event differs from the Read event in that Read occurs whenever the user selects the item in a view that supports in-cell editing as well as when the item is being opened in an inspector.
Another possible solution is to register a custom URL handler. So, basically, your registered application will be launched instead of a web browser where you can decide whether to launch a web browser and follow the URL or not. See Installing and Registering Protocol Handlers for more information.
i am using the code from this website to create a basic service
http://code.msdn.microsoft.com/windowsdesktop/CppWindowsService-cacf4948
and i want this service to appear as an icon in the toolbar.
would i be able to start and stop the service from the icon?
right now i have to go into the SCM to start and stop the service and it takes too long to scroll down the list and find the service then start or stop it.
some websites are saying this can't be done because you can't interact with a service
is this true?
i don't care if this is a bad idea or shouldn't be done. i just want to know the code if can it be done so can someone please help?
I got a "Please avoid extended discussions in comments" message, so I'm proposing this answer.
Write a icon tray application; this link gives an example of how to do this (also see the "Related Articles" on the right of the article).
When you (right-) click on the tray icon, the icon tray application should determine if the service is already running; if yes, pop up a menu item to stop the service, otherwise pop up a menu item to start the service.
Answers to this StackOverflow question has pointers to how you can manage services using the Windows API.
Is there a way to send a text message to someone and in the message have a single button/link that will send a text message from their phone to a voting mechanism?
Example: Pedro is running for class president. I want to send a text to everyone that says:
Vote for Pedro!
And when they click on the link, it sends a text message from their phone to 73774 with the text: 110084.
I'm asking this in the ColdFusion section because I know ColdFusion and don't know PHP.
No, text messages are just that... text.
Now, if you send a link, such as http://vote.for/pedro, most phones will automatically highlight that and open it in the users browser, but this isn't quite what you are looking for.
I have an MFC application that has a webcontrol. When clickable links are clicked, it opens using IE, not the default browser.
Questions :
Is there a way to force it to open using the default browser?
If not, how do I capture the Link Click event so I could just manipulate the click event later?
Thanks...
No, not as far as I know.
Check out the articles on http://ehsanakhgari.org/article/visual-c/webbrowser-goodies . It has a number of articles that show how to set up an event sink using IDocHostUIHandler etc. to handle events like clicking of links. I'm not sure which interface to implement, it's been years since I last did this. Then, you use ShellExecute() with a url as the third parameter to open a url with the default browser.
You can capture click events by using "HRESULT STDMETHODCALLTYPE Invoke" see MSDN for more details.
And here's a great example that shows how to open your URL using the default browser in the same window, or opening a new window > http://www.codeproject.com/KB/IP/urlnewwindow.aspx