View Single Post
Old 02-20-2012, 07:24 PM   #460
Gauthier
Enthusiast
Gauthier knows the difference between 'who' and 'whom'Gauthier knows the difference between 'who' and 'whom'Gauthier knows the difference between 'who' and 'whom'Gauthier knows the difference between 'who' and 'whom'Gauthier knows the difference between 'who' and 'whom'Gauthier knows the difference between 'who' and 'whom'Gauthier knows the difference between 'who' and 'whom'Gauthier knows the difference between 'who' and 'whom'Gauthier knows the difference between 'who' and 'whom'Gauthier knows the difference between 'who' and 'whom'Gauthier knows the difference between 'who' and 'whom'
 
Posts: 25
Karma: 10000
Join Date: Jan 2012
Device: kindle
Quote:
Originally Posted by =X= View Post
@ Gauthier: Okay so I had some time last night to test the code you suggested in post #445 (link).

A couple things. The "Public const ..." works on 2003 so I'll update both 2003/2007 to use that new syntax. Don't recall why I used set/get. I think that was an old VB habit (dating myself i know).

The second part has me concerned, I don't think we want to put everything in the registry, just external and user settings. I see BC having three types of data. Template data, book data, and user performances.

User pref should go in the reg. For instance calibre's location, book creation preferences.

However template data should be kept in the template. An example is the FIRST_RUN variable.

Book data such as publisher, author name, tags should be kept in the document properties data.

That said if I'll try to get around to updated the code this weekend and posting the code up to the website you created.

=X=
I'm still rewriting much of the code to allow work on multiple book simultaneously.
I've made the dialog non modal and work with multiple independent instance of the form (one per opened book).
However, I'm not sure If I'll leave the dialog non modal: It works, but when moving the document between screens, the dialog doesn't follow, that make it awkward. I may try to remove the dialog completely in favor of additional Custom Ribbon Tabs which are docked and follow the document. But I'm not sure if it is really possible.

FIRST_RUN doesn't seems to be needed in the 2007/2010 version. It's only real use is in creating the old 2003 menu. Is there any other real template variables?

To handle multiple document, I have also totally reworked the Document_New, Document_Open and Document_Close macro along with the init/first run code
and migrated that to a DocumentChange event handler and AutoExec and AutoExit macro See a Reference:
http://msdn.microsoft.com/en-us/libr...ice.10%29.aspx
The Document Change event is also used to switch variables context and invalidate the portions of the CustomUI I made dynamic (and thus refresh them). (Still need to prevent document switch while calibre generation is in progress...)

I've also extensively renamed variables and Forms element to stay consistent in the prefix.

I'm currently stuck with a bug in vbaLoadPictureGDI which seems to work in excel, but not in word. I intended to use that as cover previewer (it support png images which the standard VB forms image control doesn't).

I hope to have something sufficiently stabilized to share the code this Week-End.

A side question, is there any interest in those new features:

1 Optionally using the word pdf generator instead of the calibre one.
Adding it should not be much work: just import the cover and add a save.

2 Adding a RTF output, same level of work as the PDF with much overlapping.

3 Making the cover optional on a format Basis or when a cover is specified Generate a version with cover and without or a combination thereof.

Last edited by Gauthier; 02-20-2012 at 07:52 PM.
Gauthier is offline   Reply With Quote