Skip to content

Invoice Workflow

This example uses the data from a .csv file to generate a Word document invoice.

The document is exported as a PDF and saved using the customer name for each file.

This could be further automated by sending the invoice out by email.

Keeping the images folder open on screen works well as sometimes TagUI may not find the image in order to carry out the next step in the script.

Word and Adobe Reader are required to run this script as per the video.

Video: Automate an Invoice Workflow


Invoice Generation
// timeout 30 seconds

dclick images/invoice.png

//Data from invoice.csv

dclick images/customeraddress.png
keyboard `customeraddress`

dclick images/customername.png
keyboard `customername`

dclick images/customernumber.png
keyboard VP Customer ID: `iteration`

keyboard [pagedown]

dclick images/tableval.png
keyboard `supportval`
keyboard [tab]
keyboard `SUPPORTTOTAL`
keyboard [tab]
keyboard `SUPPORTTAX`
keyboard [tab][tab]
keyboard `TRAININGVAL`
keyboard [tab]
keyboard `TRAININGTOTAL`
keyboard [tab]
keyboard `TRAININGTAX`
keyboard [tab][tab]
keyboard `CONSULTINGVAL`
keyboard [tab]
keyboard `CONSULTINGTOTAL`
keyboard [tab]
keyboard `CONSULTINGTAX`

//Refresh calculation
keyboard [ctrl] a
keyboard [f9]

// EXPORT PDF
keyboard [alt] f e a

// CHECK YOUR OWN FOLDER PATH

keyboard C:\\tagui\\vpWorkflow\\vpInvoice\\invoices\\invoice_`customername`.pdf
keyboard [enter]

// DON'T SAVE WORD
keyboard [alt][f4]
click images/dontsave.png

To run the script at the terminal type:

tagui invoice_workflow.tag invoicedata.csv -h

Note

Open the images folder while running the script from the command line so that TagUI can interact with the .png/image files referenced in the script.

Hint

Download project scripts

Image files may need to be recreated depending on OS and screen resolution


If you require support or help check out our services page.