You are here Embed any application to Task Pane in Excel with BSAC

Embed any application to Task Pane in Excel with BSAC

 With any application as Zalo, Chrome, Word,... you can embed in Task Pane in Excel with BSAC. Now I show step by step to do it. 
Step 1: Refrences BSAC.ocx into Excel file or application.
+ In VBA window, click menu "Tools"->"References". 
+ From window "References - VBAProject", click button "Browse", select file of type is "*.ocx" to find OCX files. Open folder:


C:\Windows\SysWOW64 (for Windows 64-bit, Office 32-bit)
C:\Windows\System32 (for Windows 64-bit, Office 64-bit)

C:\Windows\System32 (for Windows 32-bit, Office 32-bit)

Find "BSAC.ocx" and select it.

Step 2: You need a tool to find information of application window "Spy++". Download Spy++ at link: 

Step 3: Create module and coding:


Option Explicit
Dim TP As BSTaskPane
Sub CreateTaskPane()
    Dim TPs As New BSTaskPanes
    'SinkControl = "Class:Title"
    'Class: Chrome_WidgetWin_1
    'Title: CÔNG TY CỔ PHẦN BLUESOFTS - Google Chrome
    Dim SinkControl As Variant
    SinkControl = Range("B1").Value & ":" & Range("B2").Value
    Set TP = TPs.Add("My Task pane", SinkControl)
    Set TPs = Nothing
End Sub
Sub ClearTaskPanes()
    Dim TPs As New BSTaskPanes
    Set TPs = Nothing
End Sub

(*) Sink control:
SinkControl is parameter in BSTaskPanes.Add(....), it can be:
+ Userform (Object): BSTaskPanes.Add("My title", Userform1)
+ Handle (Long, LongPtr): BSTaskPanes.Add("My title", Handle)
+ Title (string) : the title of application: BSTaskPanes.Add("My title", "Zalo")
+ "ClassName:Title" (string): BSTaskPanes.Add("My title", "ClassName:Title")
If you find window with no title - only class then

Step 4: Use tool Spy++ to find Class name and Title/Caption of appliction window, in this article I help you embed Chrome. I put class name in cell B1, Title in cell B2.

Step 5: Run code you have a Task Pane with Chrome embeded:

If you installed Add-in A-Tools then BSAC.ocx included. If you do not install A-Tools, only BSAC then download and install it at link.

Video instruction:

Example embed Zalo into Excel at link. (Source code in SetupBSAC)