Macro - export - defaults to "Range"

4 posts / 0 new
Last post
Katy Mayer
Offline
Joined: 12/13/2016 - 17:45
Macro - export - defaults to "Range"
Images: 
Brian Element's picture
Brian Element
Offline
Joined: 07/11/2012 - 19:57

Hi Katy,

Not too sure what you are looking for.  If you want more information on the range it just allows you to select the range of transactions in your database.  For your example you have 3 records, if you want to export the entire database you would select 1 to 3.  If you wanted only the last two records you would change the starting record to 2.  Is this what you are interested in?

Brian

Katy Mayer
Offline
Joined: 12/13/2016 - 17:45

Hi Brian,
The issue is when recording the macro - I set it to export "ALL" (since each export file will have a different amount of records). But, each time I run the macro, I notice it resets to "RANGE". I have noticed this with each macro - but I can't figure out why it's defaulting back to "RANGE". It also changes the location to the IDEA folder, instead of saving it to the Desktop, which is where I selected it when I was recording the macro.

Brian Element's picture
Brian Element
Offline
Joined: 07/11/2012 - 19:57

Hi Katy,

In the task.performtask line there is usually an option for the start record, which is 1 in this case and the last record, which is the db.count in this example.  So if you script has 1, db.count then you will get the entire range.

I think IDEA defaults to the project folder each time you open IDEA, I don't think there is a way to permanently change this.

For the range do you mean each time you click on the export it select range instead of all?

Set db = Client.OpenDatabase("Fuzzy Duplicate - addresses.IMD")
Set task = db.ExportDatabase
task.IncludeAllFields
eqn = ""
task.PerformTask "C:\Users\eleme\Documents\My IDEA Documents\IDEA Projects\Samples\Exports.ILB\Fuzzy Duplicate - addresses.XLSX", "Database", "XLSX", 1, db.Count, eqn
Set db = Nothing
Set task = Nothing