Results 1 to 6 of 6
  1. #1
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    DOCument as a series of user-defined objects (Word

    I've been trying to get my head around this all day, with little success.

    In the past I've used {Fields} of various types, including those that bring in text from files, and those that bring in images from files, but now I want to define a data structure that permits the dis-assembly and re-assembly of documents. Any document would be a series of chunks, where a chunk can be pure text, pure graphic, pure a/v, or a series of chunks. You can visualise the final document as a hierarchy of chunks.

    Here's a chunk descriptor:<pre>Type VChunk
    dtLastMod As Date 'date/time latest modifaction
    strStatus As String ' encoded text
    strHistory As String ' descriptive text
    fnBodyItem As String ' points to a file that contains one or more chunks
    End Type</pre>


    I can visualise VBA code that manages these chunks, but I can't see what I'd actually put into a document. The basic idea is that a Word document would hold the chunks (actutally, the final document would be the root of a tree of pointers, where the nodes are ultimately pure text, pure graphic, or pure a/v), and my application would police the management, maintenance, assembly, and transformation of a chunk into any target form such as LPT, PDF, DOC, HTML WinHelp and so on.

    I'm keen to have a shot at this, but am stumped at migrating the concept of a chunk descriptor to a document.

    Would I have to create a new sort of object that would then appear in ... (Word: Insert, Object,...)?
    Should I use {INCLUDETEXT}, {INCLUDEPICTURE} etc and rely on Document Variables in each file item ("chunk container") for the descriptors?

    Is any of this making sense? I think my mind is somehow locked into the idea of Class objects in VBA and I want to create things just like that in Word.

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: DOCument as a series of user-defined objects (

    Word documents are OLE containers that merge together a number of streams and style them with associated formatting. You can work with the system or against the system, but that is nature of Word documents. <img src=/S/smile.gif border=0 alt=smile width=15 height=15> In fact, it is not much different than HTML and CSS, but for the fact that it can embed everything into a single container.

  3. #3
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: DOCument as a series of user-defined objects (

    > You can work with the system or against the system,

    Thanks, Jefferson; this sounds like "stick with {IncludeText} and [IncludePicture}", is that correct? Conceptually each chunk could be contained in a single document file or could be a unique bookmarked portion of a document file. Practically I'd have to make sure that styles and trailing carriage returns didn't get in the way ...

  4. #4
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: DOCument as a series of user-defined objects (

    If the "recipe" is in a Word document, then yes, I guess you have to use field codes. But if the assebmly instructions are in an XML file, you can assemble a pure, non-linked, stand-alone Word document. I guess my point is, if you think about chunks the way Word does, that should help.

  5. #5
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: DOCument as a series of user-defined objects (

    Thanks again for the response, Jefferson. I've spent the day mulling a bit more, and have managed to enhance the structure "descriptor" to be implemented as a set of custom document properties (could be variables). The descriptor components can include a language code (En, Fr, Sp, etc) and even a type, using a binary scale notation, 1=text, 2=graphic, 3=av, 5=graphic & av, and so on.

    Now all i need to do is write the descriptor-management application - to filter and assemble chunks and I'm done.

  6. #6
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: DOCument as a series of user-defined objects (

    [i]We have demonstrated that chunks can hold text, graphics, or a series of chunks.
    We have demonstrated that a chunk can hold a non-printing descriptor that includes date last modified, history notes, status flags, index entries, language and anything that can be described with regular Word data (strings, longs, dates etc.)
    We have devised a simple macro to harvest raw text and save it as a chunk, to harvest raw graphic and save it as a chunk, to harvest raw a/v material and save it as a chunk, and to harvest a series of chunks and save the series as a chunk.
    We have devised a macro to permit the administrator to edit the descriptor (history notes, status flags, index entries, language.)
    User Guide material can now be considered to be established in Word documents as chunks of text.
    We should be able to establish a maintenance device that makes use of our chunks to:
    1) Build a shopping list of chunks (Language=

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •