OneNote 2016: How to: selected text in a page & subscribe to the onClick event - com

I want to implement a COM OneNote Add-In (for OneNote Desktop) with the following functionality:
User selects some text and then clicks the FORMAT button exposed by the add-in: the add-in will format the selected text in some specific way (e.g. surround the text with "<<>>" and change its background and foreground color.
Later on when the user clicks on a text that was formatted as described above the add-in kicks in and copies the text in clipboard
I am new to COM add-ins, and I wasn't able to find a good API documentation. I've started with VanillaAddIn (https://github.com/OneNoteDev/VanillaAddIn) and now I need to add my functionality. I would really appreciate any help with the following:
How to get the selected text from a page?
How to subscribe to the OnClick event?
Is there a good/decent OneNote API documentation? I found some links but I still hope there is a better one that I missed so far.

To get selected text from a page, look at the GetPageContent API. You can see it used here: https://github.com/OneNoteDev/VanillaAddIn/blob/master/VanillaConsole/Program.cs
From the page content xml, you can find some elements that are "selected".
OnClick event: There's no way to know when someone clicks on some text on the page, unfortunately.
One site that can help with parsing the page content is the OneNote XSD. Here: https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/63/17/0336.OneNoteApplication_2013_xsd.txt

Related

How can I do find and highlight text in outlook

I am developing outlook web-Addin visual studio share point developing tool.i want to find a specific word in the document and highlight that word.
#Vishnu Kay Vee
Currently the feature you requested is not a part of the product. However, we track Outlook add-in feature requests on ourĀ user-voice page. Please add your request there. Feature requests on user-voice are considered when we go through our planning process.
[Outlook Add-ins Engineering Team]
In the email message or item you're creating, on the Format Text tab, in the Editing group, choose Find.
In the Find what box, type the text that you want to search for.
Choose Reading Highlight > Highlight All.
Note: To turn off highlighting on the screen, choose Reading Highlight > Clear Highlighting.
This link will help you about Find and replace text within an email message or item: https://support.office.com/en-us/article/find-and-replace-text-within-an-email-message-or-item-ee05a4ac-6c30-4687-8098-84f4390d2d6f

How to navigate to specific contents of madcap flare's document from vb.net code?

We have been using PDF file as a part of help docs in our vb.net desktop application. In PDF, we would traverse to the certain chapter in the PDF doc.
Now we have decided to use MadCap Flare as documentation tool. We have a menu item in vb.net form for documentation. On click of the link, we want to open the specific chapter of the Flare documentation.
You know managing content with single-source XML authoring is possible when using MapCad Flare (I'm not using Flare!). You can publish content to an increasing number of formats including HTML5, WebHelp, PDF, Word, XHTML, Clean XHTML, EPUB, DITA and more by MapCad Flare.
So, you may continue using PDF and the way connecting your vb.net desktop application help.
Using HTML based topics maybe another solution for your needs by creating Help for a form, a dialog or control with HTML files (See also: Help for controls with VB .NET).
Properties to display help (HTML file - local)
Activate the hlpProvider component hlpHtmlLocal and set the HelpNameSpace property of hlpHtmlLocal to the file name you want to work with.
We open a local HTML file with the dialog using the little button to the right.
The next step is to set the HelpNavigator property of a control (e.g. button) to a value of the HelpNavigator enumeration (see table below). Here we use Topic.
When the application is running click the HelpButton to enable "What's this .." Help. The cursor changes. Now click the button or press F1 when the button has focus. This will open the single HTML file in your browser.
It seems you can't use anchor names to jump to a specific part of your HTML file.
Properties to display help (HTML file - Server http://..)
Activate the hlpProvider component and set the HelpNameSpace property of hlpHtmlServer to the file name you want to work with. Here we use a http:// address of a single HTML file. If you provide the file on your company server, you don't have to update the help file with the customer.
The next step is to set the HelpNavigator property of a control (e.g. button) to a value of the HelpNavigator enumaration (see table below). Here we use Topic. Then we set the HelpKeyword on hlpHtmlSever property to e.g. "anchor3". Don't add a leading "#". Leave it empty if you want to open a HTML file without anchors. The Help Handles cmdControl2.Click Dim sHelpFile As String Dim sStartupPath As String '--- Initialize context-sensitive help --- Keyword property provides the key information to retrieve the help associated with the control.
When the application is running click the HelpButton to enable "What's this .." Help. The cursor changes. Now click the button or press F1 when the button has focus. This will open the single HTML file over the Internet in your browser.

Manually changing Google Custom Search's search box and button

I want to make my own custom search box and button for GCSv2.
Here is my code:
(pastebin because I am too lazy to make my code look right)
http://pastebin.com/p4yThTma
And the code I want the search box and button to be linked too,
http://pastebin.com/SK1Df7rs
i was trying to find a way to do it as well but i couldn't
on google webpage there isn't enough information about modifying the GCSE
https://developers.google.com/custom-search/docs/element
i would like if someone already customize it to share it with us

Display Pop-Up in PDF when Clicked or Typed?

I have a collection of example documents in PDF forms that are viewed by clients, They all include a "Example" watermark prominently displayed but I have had some issues with clients trying to fill in the example forms and submitting as Official forms, normally followed by a support phone call from the client. I am looking for a way to pop up a message in the pdf if the client trys to type or click in the example document, I know how to pop up a message if they click in a form field but some of my documents do not have any form fields so I am looking for a way to show a message if a client trys to type or click anywhere in the actual document. I am using Acrobat X Pro.
Does anyone know of a way to do this?
Thanks in advance for any advice!!
Plop a big invisible button (not hidden, invisible) over the entire page, with a click action that pops up a message dialog with whatever warning you wish.

Using VSTO to perform an action via selected e-mail text in Outlook

This should be pretty a pretty common scenario, but I have not found a solution yet.
I would like to highlight some text within the body of an e-mail and then click on something (context menu, toolbar button, etc) to perform a URL navigation using the selected text. For example, highlight the Fex Ex tracking number and then navigate to their web site using it as a query parameter (like "ww.fedextracking.com?packageid=12345").
How can you capture the selected text within an e-mail and then perform an action? I would greatly appreciate any suggestions or examples.
Thank you!
For Outlook 2007-2010 (or previous versions using WordMail), you can retrieve a Word object from the Inspector.WordEditor property. Then you can work with Word.Selection to access the selected text.
However, for Plain Text or Rich Text scenarios with Outlook 2000-2003, you have to use the SafeInspector object with Redemption (http://www.dimastr.com/redemption/) to access the selected text. I can't remember, but for HTML format messages with Outlook 2003-2003 you may be able to access the selected text with the IHTMLDocument object retrieved from SafeInspector.
I appreciate it's 588 days since you asked your question Loki70, but if somebody else Googles up this page (like I did, looking for how to create a selected text right-click context menu entry) then this may be an answer for you.
I have been using AutoHotKey, which works not just in Outlook, but everywhere in Windows, and have been writing utilities to Google the selected text, open an SSH session in PuTTY to the selected hostname, and similar.
If you don't mind running an extra application on your PC to capture the hotkey combination that you send, then this would do exactly what you're asking.
Here is my post on the AutoHotKey forum with a link to my code:
http://www.autohotkey.com/community/viewtopic.php?t=86402
It would be trivial to adapt this to do the FedEx query you've mentioned.
I hope this helps.