VoiceGuide IVR Software Main Page
Jump to content

Excel Macro

Recommended Posts

Is it possible to execute an Excel macro?

 

My DDE command is as follows:

 

Topic: Excel|Sheet1

Item: <blank>

"Execute Command" selected

Command: [Run(FindPrefix$RV_LINEID)]

 

I've also tried:

 

Command: [Activate(FindPrefix$RV_LINEID)]

Share this post


Link to post

Not too sure how to invoke Excel macros via Excel's DDE interface - best to look into Excel manuals on this one...

 

You may want to look into using the Run VB Script module to control Excel via it's COM interface. There are some examples in VG Help file:

The VB Script below saves information to an Excel spreadsheet.

 

Dim xlApp, xlBook, xlSht

Dim filename, value1, value2, value3, value4

 

on error resume next

 

filename = "c:\warehouse.xls"

 

Set xlApp = CreateObject("Excel.Application")

set xlBook = xlApp.WorkBooks.Open(filename)

set xlSht = xlApp.activesheet

 

xlApp.DisplayAlerts = False

 

'write data into the spreadsheet

xlSht.Cells(2, 2) = "New Data"

 

xlBook.Save

xlBook.Close SaveChanges=True

xlApp.Close

xlApp.Quit

 

'always deallocate after use...

set xlSht = Nothing

Set xlBook = Nothing

Set xlApp = Nothing

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×