Solved .thmx (1 Viewer)

Guillem

Member
Local time
Today, 13:46
Joined
Mar 28, 2020
Messages
32
Hello,
first I apologize for my bad English, is not my native language. I hope you can understand my messages.
I have a huge database to convert from 2003 to 2019. After looking around I feel there not an automatic way to apply a Themes to already existing forms and reports in the converted database.
I would like to make a program that read object properties from a .thmx (office themes) file to apply corresponding properties to each control of all forms and report.
There is a way to read such data from .thmx file?
thanks for any help!
Guillem
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 20:46
Joined
May 7, 2009
Messages
19,175
just for info those records are Attachment type.
 

isladogs

MVP / VIP
Local time
Today, 12:46
Joined
Jan 14, 2017
Messages
18,186
Unfortunately there is no built in way of adding themes to forms converted from old MDB files.
You will need to do that manually after conversion.
There are ways of making it slightly easier but its still likely to be time consuming.

Theme info is stored in a system table called MSysResources (along with image gallery files) and a deep hidden system table with a long name f_...long string here...Data. The latter cannot normally be accessed directly.
For more info on each table, see the second page of my website article Purpose of System Tables

By default the theme attachment opens in PowerPoint but it shows little more than the theme thumbnail image in the ribbon
 

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 12:46
Joined
Jul 9, 2003
Messages
16,245
There is a way to read such data from .thmx file?

This thread on stack overflow might provide some inspiration, but more likely perspiration!

 

sonic8

AWF VIP
Local time
Today, 13:46
Joined
Oct 27, 2015
Messages
998
There is a way to read such data from .thmx file?
Yes.
.thmx files are just ZIP file containing an XML file.
Some basic color information is fairly straight-foward to read from these files. However, I do not know enough about themes to give advice on how to apply that to a database by code.
 

Guillem

Member
Local time
Today, 13:46
Joined
Mar 28, 2020
Messages
32
Unfortunately there is no built in way of adding themes to forms converted from old MDB files.
You will need to do that manually after conversion.
There are ways of making it slightly easier but its still likely to be time consuming.

Theme info is stored in a system table called MSysResources (along with image gallery files) and a deep hidden system table with a long name f_...long string here...Data. The latter cannot normally be accessed directly.
For more info on each table, see the second page of my website article Purpose of System Tables

By default the theme attachment opens in PowerPoint but it shows little more than the theme thumbnail image in the ribbon

Very interesting this article Purpose of System Tables. Thanks
 

Guillem

Member
Local time
Today, 13:46
Joined
Mar 28, 2020
Messages
32
Reading .thmx /XML from System Tables o directly from file seems a lot of research work for one shot application.
I will try a much simpler way from a form template with each control type created and formated from scrach. and aplying those properties to all forms and reports in converted database.

Thanks to all of you for all this good information.
guillem
 

isladogs

MVP / VIP
Local time
Today, 12:46
Joined
Jan 14, 2017
Messages
18,186
That's similar to what I was going to suggest.
Create a form template and add at least one button , textbox & label to the template using your chosen theme.

Rename one of your forms e.g with BKP suffix and open it in design view.
Now make a copy of the template, rename it as your original form. Open that as well in design view and place it to one side of the BKP form
Lasso all objects on your BKP form - copy & paste to your copied template.
Use the format painter tool to update the appearance of all old objects to your new theme

Next copy the record source of the old form & all code to the new form.
If you use embedded macros (bad idea!), you may find they migrate (or not?)

Hopefully your new form is a fully working copy of the old form in the chosen theme.

If it does work, rinse & repeat for all other forms
If not, tweak the above for anything I've forgotten

Have fun
 

Guillem

Member
Local time
Today, 13:46
Joined
Mar 28, 2020
Messages
32
Thanks for this solution. I will keep you all informed about the final solution used.
 

Users who are viewing this thread

Top Bottom