Where Does Visio Store Import Map/Page Settings?

Started by learningVis555, October 29, 2020, 05:03:20 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

learningVis555

Hello, not sure if this is the correct place to pose this question.  I have been searching and looking through my folders and cannot determine where Visio stores things like the mapping and page settings for org chart imports?  I am talking about when you go to create a new org chart from the main Visio template and use the wizard to import.  I know it stores settings somewhere because when I re-open Visio, it usually brings up my last-used settings, including the Excel file name and location. 

What I need to do is be able to back up at least the page setup information, where you specify the top level exec, number of suboordinates, and page name.  We often need to create up to 60 pages and having to re-do them all the time is really a pain.  This happens because we may need to run different reports, use different Excel files, etc.  So it is important that I can have staff just pull those settings back in.

I would love to be able to get VBA set so we can just run it using a macro but I do not know how to make that work in Visio (familiar with it in Excel, Outlook, and Word).  I have it so it will run an import but I do not know how to set up the page settings in VBA.  I found a Content16.dat file but I do not know if that is where these settings are kept.

Using Visio Pro in Office365.

Hoping someone here can help.  Thank you!

Paul Herber

Stuff like this is normall stored in the registry. You will need to find and open the Registry Editor to view items.
The area to look at for Visio (for Visio 2016) is
Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\16.0\Visio
Visio 2019 will probably be:
Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\17.0\Visio

Not much can be done with the build-in addons like the Org Chart and its wizard though via VBA or any other programming language.
Electronic and Electrical engineering, business and software stencils for Visio -

https://www.paulherber.co.uk/

wapperdude

Seems like you could populate your page with some default settings / setup and save it as a template.  Then, whomever can use the template as the basis for new chart.
Visio 2019 Pro

learningVis555

Thanks, I tried to create a template but every time I create a new import from the templates I save, everything that imports just comes in as the usual defaults of Visio.  Unless someone can tell me how to fix that issue?

I will look in the registry...that surprises me, as normally things like that are stored in something like an AppData folder, at least in Outlook, Excel, Word.  Was expecting to find it all there.

I just imported 35 charts, and now have to re-do everything...I set the font to 26pt, but the shapes never adjust to this.  Is there any VBA code that someone knows so that I can make the shapes re-size automatically to the font size? 

Thanks

learningVis555

Paul, I found the data in the registry but am not certain what to look for....I was thinking it would be under the 'Data Connection' area, would that be correct?

Thanks

learningVis555

Nevermind, I found it...it is under Solution, then Pages.

If anyone knows VBA to set the formulas in the shape sheet to make the shapes auto-resize to the text size, that would be awesome!

learningVis555

So now I have copied the string in that Pages string value in the registry and can paste in whatever variation I want.  So now it seems that the key is to use VBA to re-write the string value every time, based on the settings the staff needs.  So theoretically it should be possible to set the pages to whatever you want using VBA without having to manually re-type everything.  Going to start working on that piece, will let you know if I get it working.

In the mean time, if anyone knows VBA to set the formulas in the shape sheet to make the shapes auto-resize to the text size, that would be awesome!  I do not know how to use VBA to edit that, and even if I did, I would not know what Visio needs in the shape transformation section in order to make that happen...so if I set the font to 26, I want it to auto-resize all the shapes on the page and then set to best fit to the page, then fit the drawing to the page. I have the code doing the latter two steps, just not sure about the shape re-size piece which of course needs to happen first!

Should I post that as a separate question?