Generating masters from database at runtime

L

Lant

Is there a way to generate masters from a datebase at runtime
programmatically.
Here's the scenario:
Using Visio 2003, VBA, and Access

I need to create the masters (one for each record in the database). I have
to create a fresh stencil with the masters to reflect the records currently
in the database.
I can do this from the menu using the Tools - > Add ins -> Database Wizard
and 'Creating Masters from Database' but how can I do this programmatically.
I am unable to record the macro doing this as it is an add in.

I was considering opening a database connection and getting the recordset
using a query and looping thru the records and creating the masters (about
100 of them). But, not sure how to go about doing this. I prefer an alternate
solution if available.
 
J

junethesecond

This may be done in 3 steps,
and 2 and 3 steps may be recorded by visio.
for each record
1. reads record of database from visio.
ADO(activex data objects) may help you.
2. draws a shape on visio drawing page.
3. drops the shape on a new stencil.
 
L

Lant

I am able to create the stencils at runtime using the suggested steps. I have
some shapes I need on page -1 of the drawing sheet. So, I add a new page and
create the stencils. How can I save just the new page (page 2) as a stencil
file - not the entire drawing. I should not close page-1.
Else, is there any other way to use a new drawing page and create the
stencils and save it? Any ideas?
Thanks

Lant
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top