Execute Visio Report via VBA Macro

Started by wxaggie11, May 24, 2011, 08:16:55 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

wxaggie11

Hi Guys

I'm trying to get a self-defined Visio report to run when I call a VBA macro. Let's say the report file name is "Report.vrd"

I found the following code and posted it into my project:

Visio.Addons("VisRpt").Run ("/rptDefName=Report.vrd/rptOutput=EXCEL_SHAPE")

This gives me the error that the report definition is not valid. I've tried saving the report definition to a file and within the drawing itself. Is the above syntax correct?

wapperdude

I'm not much into programming, and definitely not running add-ons, but I did run across this syntax change.  Try visio.Application.Addons

HTH
Wapperdude
Visio 2019 Pro

Michelle

I found this posting in my search for an answer of how to make running a report easier for my end-users.  I have tried both syntax suggestions, and still get the "report definition is not valid" error.  I'm calling it with RUNMACRO in the EventDoubleClick section of a rectangle on my template. 

Is the Name=Report.vrd part of the code referring to the name I see when I click on shape reports in Visio?  That's the only part I can think might still be causing problems...

Any help is appreciated!
Michelle