Search
OneNoteGem
  • Home
  • Addins
  • Buy
  • Documents
  • FAQs
  • Templates
  • Support
  • Release
  • WordNote
Gem Table for OneNote
 
 
The table of merged cells for OneNote

Use Gem Button Control in OneNote to Execute VBS Script to Run External Program

2021-01-21 07:20
 
Gem for OneNote provides button control that is primarily used to execute a VBS script attachment in the current OneNote page.
 
In this article, we'll open the calculator of windows systems by inserting a button control in OneNote to execute a VBS script.
That is, the calculator opens directly at the click of a button in OneNote.
 

VBS Script Attachment

 
We create 2 VBS Script.
 

helloworld.vbs script file

MsgBox "Hello World!"

 
It will pop up a window showing Hello Word!

helloworld.vbs
 

runcalc.vbs script file

 

On Error Resume Next
 
set wshshell=createobject ("wscript.shell" )
 
rem d=wshshell.run ("calc",3)
d=wshshell.run("c:\windows\system32\calc.exe",3)
 

it will run c:\windows\system32\calc.exe, Windows calculator.

 
runcalc.vbs

 
Let's drag and drop these 2 script files into the page and become attachments.

VBS Script Attachment


Create Hello Word! Button

 
  1. Click Gem’s Cooperation tab -> Controls -> Button Control. Gem will pop up “Gem Control Properties” window.
  2. In Title property, input: Hello World!
  3. In VBS property, click … button to choose the VBS file in OneNote page. Gem will pop “VBS Attach Files” window.
  4. In “VBS Attach Files” window, choose the helloworld.vbs attachment.
  5. Finally, click “OK” button. Gem will create a button in the cursor in OneNote page.
 
Create Hello Word! Button
 

Click "Hello World" Button, Pop Up "Hello World!" Prompt Window

 
Click on “Hello World!” button on the OneNote page directly.
Gem will executes hellworld.vbs, which pops up “Hello World!” prompt window.
 
Click "Hello World" Button, Pop Up "Hello World!" Prompt Window
 

Create a Calculator Button to Run Windows Calculator

 
  1. Click Gem’s Cooperation tab -> Controls -> Button Control. Gem will pop up “Gem Control Properties” window.
  2. In Title property, input: Calculator
  3. In VBS property, click … button to choose the VBS file in OneNote page. Gem will pop “VBS Attach Files” window.
  4. In “VBS Attach Files” window, choose the runcalc.vbs attachment.
  5. Finally, click “OK” button. Gem will create a button in the cursor in OneNote page.
 
 
 
Create a Calculator Button to Run Windows Calculator
 
 

Click “Calculator” Button to Run Windows Calculator

 
Just click the Calculator button on the OneNote page.
Gem will execute runcalc.vbs to open the Windows calculator.
 
 
Click “Calculator” Button to Run Windows Calculator
 

Demonstration

Use Gem Button Control in OneNote to Execute VBS Script to Run External Program


 
Download Gem for OneNote

Related Documents

  • How to Select and Copy the Paragraphs Edited by a User in a OneNote Page?
  • EXE: Create a Note of Outlook and Microsoft Sticky Notes Directly from OneNote
  • EXE: Change OneNote Page Date Time to Outlook Item Date Time after Send to OneNote
  • How do Respondents Use Content Controls to Fill Out OneNote Forms without Gem Installed?
  • How to create A4 Frame with underlines Genko in OneNote?
Command Line
Tag System
MindMap Add-Ins Comparison
Search Add-Ins Comparison
One Markdown Syntax
Table Formula
Gantt

Gem Menu Templates
Repair OneNote
OneNote Download
English website Chinese website
Mobile Site
Copyright © 2011-2025 Digital GemSoft. OneNoteGem.com All Rights Reserved.
  • Windows Office Addins >
    • Gem for OneNote
    • OneNote Search Bar
    • OneNote Gem - Favorites
    • OneNote Batch
    • Pons for MindManager and OneNote
    • Mind Map for OneNote
    • Pons for Visio and OneNote
    • Row to OneNote
    • Auto OneNote
    • Favorite to OneNote
    • Bridge for EndNote and OneNote
    • Anchor to OneNote
    • Anchor to OneNote for PDF
    • Bring to OneNote
    • Gem Table for OneNote
  • Windows UWP Addins >
    • Gem Menu for OneNote UWP
    • CiteBoard for OneNote
    • OneReader
    • OneMind for Windows OneNote
    • OneNote Reminder Cloud (UWP)
    • OneNote Batch Cloud (UWP)
  • Mac Addins >
    • Gem Menu for Mac OneNote
    • CiteBoard for OneNote
    • Bring to Mac OneNote
    • OneMind for Mac OneNote
    • OneNote Reminder for Mac
    • OneNote Batch for Mac
    • Fix One for Mac - Fix OneNote Login, Sync Tools
  • Android Addins >
    • CiteBoard for OneNote
    • Fix One for Android - Fix OneNote Login, Sync Tools
  • Cross-Platform Addins >
    • OneNote Reminder
    • OneMind for OneNote
    • CiteBoard for OneNote
    • Fix One - Fix OneNote Login, Sync Tools
  • Markdown Addins >
    • Gem for OneNote
    • One Markdown
  • Mind Map Addins >
    • OneNote Gem - Favorites
    • Pons for MindManager and OneNote
    • Mind Map for OneNote
    • Pons for Visio and OneNote
    • OneMind for OneNote
  • Other Addins >
    • One Markdown
    • Clip to OneNote
    • WordNote
    • OneShare
    • Fix One for Windows - Fix OneNote Login, Sync Tools