I am working on QTP 8.2 with SP2.My OS is Windows XP SP2.
I am working on automating a word docuemnt.Mid way through the process I need the following macro to be executed.
Dim c As CommandBarControl
Dim b As CommandBarButton
For Each c In Application.CommandBars("RAP Toolbar").Controls
On Error Resume Next
Set b = c
b.Style = msoButtonIconAndCaption
Is it possible to run this macro from QTP or convert it to VB Script.
Search the forum on how to run a macro on a Excel document. The way would be pretty similar for Word.
Buy the NEW QTP Descriptive Programming Unplugged Book
** Download QTP Unplugged 2nd Edition eBook for FREE **
I had one already with me, so here it is
Code to run an excel macro...
Set XLApp = CreateObject("Excel.Application")
XLApp.Application.DisplayAlerts = False
Set XLBook = XLApp.Workbooks.Open("C:\Book1.xls",readOnly=False )
'call Excel macro
-- Here to Learn and share ---