curtisp
curtisp

Reputation: 2325

Visio 300+ pages, split into 300+ separate docs, or print to pdf, export to jpg/gif

I created 300+ page Visio drawing by importing data to create 300+ "org charts".

I say "org charts' bc they are actually drawings of a Crystal Report as 'CEO' and its datasource tables and fields as "employees".

I now have one huge Visio file with 300+ pages, each page is one report and its datasources. But my goal is to get 300+ separate documents each named appropriately. Using vba i can rename each page as desired or obtain desired name from page.

Ideally i want to have pdf files, not visio files but in pinch would do, and last desirable would be as jpg/gif.

I have tried:

Seems every possible solution path hits pitfalls, swamps, cliffs ..

As a general note, there is either very spartan, or obtusely technical, Visio information available on internet. With any other Office product, there are loads of info, examples, etc in forums etc. But Visio its crickets.

So wonder if any Visio developers can help me choose and navigate these solution paths!

Thanks.

Edit to add: I am using Visio Standard 2003 version Edit to add Visio export to file code used

Upvotes: 3

Views: 4922

Answers (2)

curtisp
curtisp

Reputation: 2325

I've decided to take a different approach.

I used VBA and Access to create each Visio page separately, instead of creating a 300+ page Visio doc. Visio's Org Chart import data wizard is powerful but leaves one stuck for options to get individual pages out, as I outlined above.

So, in Access, I looped through 300+ report records, selecting each report's data, one at a time, creating Visio drawing for that report, naming Visio file as report name and then saving and closing it.

Then I ended up with 300+ Visio files, each one showing a report's datasource tables and fields. Good enough.

Using VBA to create chart from data 'orgwiz' http://office.microsoft.com/en-ca/visio-help/make-visio-organization-charts-from-personnel-files-HA001077464.aspx

The code is

    Set objVisio = CreateObject("Visio.Application")
    Set objAddOn = objVisio.Addons.ItemU("OrgCWiz")

    strCommand = "/DATASOURCE=c:\temp\MyDatabase.mdb, " _
    & " TABLE=MyVisioDataSource, " _
    & " DBQUALIFIER=Microsoft.Jet.OLEDB.4.0 " _
    & " /NAME-FIELD=Data_Object_Name " _
    & " /UNIQUEID-FIELD=Data_Object_ID " _
    & " /MANAGER-FIELD=Data_Object_Parent_ID " _
    & " /DISPLAY-FIELDS=" & strDisplayFields _
    & " /CUSTOM-PROPERTY-FIELDS=" & strPropertyFields _
    & " /SYNC-ACROSS-PAGES " _
    & " /HYPERLINK-ACROSS-PAGES " _
    & " /SHAPE-FIELD=MASTER_SHAPE " _
    & " /PAGES=" & strReportName

    objAddOn.Run ("/S-INIT")

    Dim cmdArray, i
    cmdArray = Split(strCommand, "/")
    For i = LBound(cmdArray) To UBound(cmdArray)
    objAddOn.Run ("/S-ARGSTR /" + cmdArray(i))
    Next

    objAddOn.Run ("/S-RUN ")

Upvotes: 1

Kamil
Kamil

Reputation: 13941

You can try to use PDFCreator (its open source).

It's a virtual printer, that prints to PDF, JPG, BMP, PNG (very useful for charts) and many other formats.

It has auto save option, configurable filenames and it can save printed document pages as separate files.

Some screenshots from application that configures virtual printer (this is PDFCreator 0.9.6).

Printing each page to separate file

printing each page to separate file

Auto-save options:

enter image description here

Upvotes: 2

Related Questions