Class Research (Excel VBA)

The class Research represents the controls of a Research query.

Set

To use a Research class variable it first needs to be instantiated, for example

Dim rsr as Research
Set rsr = ActiveWorkbook.Research

Research class variables can be set using the Workbook.Research procedure.

IsResearchService

Indicates whether the GUID specified in the ServiceID parameter corresponds to a currently configured service.

IsResearchService (ServiceID)

ServiceID: Specifies a GUID that identifies the research service.

Dim strServiceID As String: strServiceID = 
Dim booIsResearchService As Boolean
booIsResearchService = ActiveWorkbook.Research.IsResearchService(ServiceID:=strServiceID)

Parent

Returns the parent object for the specified object. Read-only.

Query

Specifies a research query.

Query (ServiceID, QueryString, QueryLanguage, UseSelection, LaunchQuery)

Dim strServiceID As String: strServiceID = 
ActiveWorkbook.Research.Query ServiceID:=strServiceID

Arguments

The following argument is required

ServiceID (String) - Specifies a GUID that identifies the research service.

The following arguments are optional

QueryString (String) - Specifies the query string.

QueryLanguage (String) - Specifies the query language of the query string.

UseSelection (Boolean) - True to use the current selection as the query string. This overrides the QueryString parameter if set. Default value is False.

LaunchQuery (Boolean) - True launches the query. False displays the Research task pane scoped to search the specified research service.

SetLanguagePair

Sets the languages for the translation service.

SetLanguagePair (LanguageFrom, LanguageTo)

Dim lngLanguageFrom As Long: lngLanguageFrom = 
Dim lngLanguageTo As Long: lngLanguageTo = 
ActiveWorkbook.Research.SetLanguagePair LanguageFrom:=lngLanguageFrom, LanguageTo:=lngLanguageTo

Arguments

The following arguments are required:

LanguageFrom (Long) - Specifies the language to translate from.

LanguageTo (Long) - Specifies the language to translate to.