MS Office Integration not working

Discussions and Tech Support related to the iMacros Google Chrome extension.
Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information:CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
Smax12
Posts: 1
Joined: Fri Jan 04, 2013 8:01 pm

MS Office Integration not working

Post by Smax12 » Fri Jan 04, 2013 8:13 pm

Hi guys,

by hazard I found this awesome tool today and directly got started reading through the website and forum and testing some stuff.

Now I wanted to ty the MS Office integration and wrote a similar vba macro like the one in the tutorials provided http://www.iopus.com/imacros/support/in ... #tutorials to extract data from a website.

I had no problems to record and then edit the imacros but Im not very experienced when it comes to VBA.
Now when I run my macro I get the error message
ActiveX component can't create object
Here my macro:

Code: Select all

rivate Sub Button1_Click()

MsgBox "TEST MESSAGE"

Dim iim1, row, totalrows

Set iim1 = CreateObject("imacros")
iret = iim1.iimInit
iret = iim1.iimDisplay("Submitting Data from Excel")

'Inset todays date
Cells(1, 2).Value = Date

'Navigate to the site and extract the first price
row = 2
'Set the variable
iret = iim1.iimSet("-var_KEYWORD", Cells(row, 1).Value)
'Set the display
iret = iim1.iimDisplay("Row# " + CStr(row))
'Run the macro
iret = iim1.iimPlay("Keyword Tool - Local Monthly Searches-1")
If iret < 0 Then
    MsgBox iim1.iimGetLastError()
End If
Cells(row, 2).Value = iim1.iimGetLastExtract(0)

'Loop through KWs and extract remaining searches
totalrows = ActiveSheet.UsedRange.Rows.Count
For row = 3 To totalrows
    'Set the variable
    iret = iim1.iimSet("-var_KEYWORD", Cells(Rows, 1).Value)
    'Set the display
    iret = iim1.iimDisplay("Row# " + CStr(row))
    'Run the macro
    iret = iim1.iimPlay("Keyword Tool - Local Monthly Searches-2")
    If iret < 0 Then
        MsgBox iim1.iimGetLastError()
    End If
    'Insert the extracted searches
    Cells(row, 2).Value = iim1.iimGetLastExtract(0)
Next row

iret = iim1.iimDisplay("Local Monthly Searches complete")
iret = iim1.iimExit
End Sub

The error seams to be in the line

Code: Select all

Set iim1 = CreateObject("imacros")

I would be very happy if one of you could help me or give me a hint what I might have done wrong.

Thanks a lot!
Tom, Tech Support
Posts: 3490
Joined: Mon May 31, 2010 4:59 pm

Re: MS Office Integration not working

Post by Tom, Tech Support » Mon Jan 07, 2013 11:29 am

Hi Smax12,

In order to automate iMacros from VBA, you need to have the iMacros scripting interface (COM API) installed. The scripting interface is only available with the iMacros Enterprise Edition. You can download a 30-day trial version from the following link:

http://www.iopus.com/download/imacros/
Regards,

Tom, iMacros Support
Post Reply