• WSfrankpasztor

    WSfrankpasztor

    @wsfrankpasztor

    Viewing 15 replies - 61 through 75 (of 77 total)
    Author
    Replies
    • in reply to: Picture Library in Userform (any) #612223

      Funnily enough Kev my boss just asked me to do the same thing.
      I need to allow our sponsors to insert a selected inline graphic (warnings, etc) into a document.

      My basic soln is to use Selection.InlineShapes.AddPicture … as the double-click event behind each picture.
      the graphic is then placed at the insertion point much like the smilies in this lounge.

    • in reply to: help with graphics (Word97/XP) #610849

      As an addendum…

      this blow-out appears to be restricted to some W97 templates whose Word.Basic was upgraded to VBA in WordXP. The ‘fix’ was to start with a clean
      template based on WordXPs Normal.dot and then import all code etc into this clean template.

      I can’t find anything wrong with the defective(?) templates so I assume that they where corrupted in some way.

      Just another of those wonderful things Word does …..

    • in reply to: Updating Footer Fields with Code (Word97) #610481

      Its not very ‘learned’ but I just switch to printview and back again.

      ActiveDocument.PrintPreview
      ActiveDocument.ClosePrintPreview

      I find that this takes a lot less code and allows me to use doc properties to update my header/footers.

    • in reply to: help with graphics (Word97/XP) #610129

      Unfortunately docs sare saved as .DOC so I cannot explain whats happening.

      But as these templates have evolved from W95 through W97 and now to XP,and the codes completely re-written ( no WordBasic)
      maybe..maybe.. maybe there’s something hiding..

    • in reply to: help with graphics (Word97/XP) #610128

      Nothing I do can stop this from happening.

      I’ll be manually rebuilding one of the offending templates from Normal.dot upwards to see if this fixes the problem.

      Do you know of any way to stop Word from converting/uncompressing a graphic file?

    • Greetings Klaus

      I have virtually the same problem with numbered Headings styles ‘drifting’. Unfortunately the renumbering(in my case)
      was an adaption of the code generated by Words Macro recorder and does use ListGalleries.

      Could you point me in a direction that doesn’t use ListGalleries?

      Frank

    • I maintain an application containing a large number of automated Word templates.

      Each template contains only enough code to auto-run, and specific boilerplate text/one-off macros

      All generalised functions are held in the one global template called TRIDENT.DOT

      The following line of code launchs a common user details form ( located in Trident).
      The parameter decides what options will be displayed. This is called by all ‘child’ templates

      Trident.Forms.Global_EntryLaunch (“DEFAULT”)

      The global template MUST BE referenced( use Tools>references) within the

    • in reply to: help with graphics (Word97/XP) #610107

      Yes, granted.

      But that doesn’t explain the Normal.doc being 76K and my custom template based doc being 593K with EXACTLY the
      same graphic(& NOTHING else) inserted using the same method.

      Frank

    • in reply to: help with graphics (Word97/XP) #610105

      I use this dialog box to allow the user to insert a garphic.

      If Dialogs(wdDialogInsertPicture).Show = 0 Then
      ‘ Graphic cancelled
      Selection.MoveLeft Unit:=wdCharacter, Count:=1, Extend:=wdExtend
      Selection.Cut
      Exit Function
      End If

      Substituting the following InlineShape makes NO difference to size…
      Selection.InlineShapes.AddPicture FileName:= _
      “C:Documents and SettingsFrankMy DocumentsMy PicturesCAKE.JPG”, _
      LinkToFile:=False, SaveWithDocument:=True

      Now both work but what I can’t understand is why using either of the above(or manually inserting) to insert a graphic
      Causes a document based on the Normal.dot to be almost TEN TIMES SMALLER than one of my customized templates
      Could this blow out be caused by something in my templates or is this a Word problem?

      Frank confused

    • in reply to: Passing Arrays between Templates WordXP/97/VBA #581232

      Unfortunately I don’t know how to write class modules yet but between your answer and Chris Greaves I’ve got a viable solution.

      Looking at your example I can’t figure out why mine wouldn’t work. Maybe after I’ve got a working string parsing solution going I’ll be able to re-visit a ‘neater’ array solution.

      many thanks
      Frank

    • in reply to: Passing Arrays between Templates WordXP/97/VBA #581230

      bow bow bow bow bow bow bow bow bow bow bow bow bow bow bow

      Passing style name arrays was what I needed. Your answer now puts me on the right track and the code will follow.
      Incidently you’ve also solved a couple of other questions that I hadn’t got around to looking at.

      One of the annoying things about programming is the inability to see a bug/solution thats stareing you right in the face.

      BTW you made a spelling mistake near the end, the correct line reads;

      ActiveDocument.Styles(“Style1”).LanguageID = wdEnglishAUS

      Many thanks
      Frank

    • in reply to: Passing Arrays between Templates WordXP/97/VBA #581055

      Thanks for your comments everyone but to clarify my situation…
      I have heaps of templates being used throughout Australia to deliver technical documents.
      My front end uses a global template to control execuation , and VBA code in the ‘child’ templates.
      Now the documents produced do have their own styles but are continually being updated and modified.
      With several different style sets, using the ‘latest’ version results in the newly attached macros failing becouse the document
      and the new template don’t share a common style set.

      My solution is to create a 2 dimensional array that controls substitution of style sets, updates the document and then deletes the old style set. This must be in the new template.

      I would like the actual VBA procedures to be global and located only in the global template. But becouse I
      can’t pass an array from a documents attached template to the master global one I have to duplicate the same code in each of many many many templates.

      There are literally thousands of docs out there, a global module is a lot easier to keep track of than an
      entire suite of induvudualized templates.

      Thanks again for your responses.

    • in reply to: Word Template Corruption (2002 SP1) #580341

      I don’t know why the corruption happens but you may be able to simplify things if you have separate styles
      for each font used. In our templates we use only two actual fonts but a ridiculous number of styles.

      When I need to change fonts/styles I attach the document to its new template, and substitute the newer style for the current ones. Providing you can make up an array containing BOTH the old and new styles
      The entire process can become relatively painless.

      Its less traumatic to add/update/delete a style than conduct open heart surgery with fonts.

    • Don’t know if good evening is warranted geof,

      As my firm will be going the XP upgrade path in the third quarter of 2002, and we have a huge number of W95/W97 documents in our system, I’m particularly interested in any ‘legacy’ problems that I might be in store for.

      Where you said that you opened the binary file, are you talking about modifying each and every word template and document?

    • in reply to: Using Word 97 and XP in the same home (Word 97) #571588

      greetings and Salutations,

      (1) I am producing templates that must function in both W97 and XP and they do. To cover as many contingencies as possible set your XP options for W97 compatibility. There may be backwards compatibility problems in complex docs but I’ve only hit one really troublesome one… see (3)

      (2) Yes, You will find that most W97 VBA code is common. Most WordBasic even works.

      There isn’t any conversion required. Your only prob may be that some otherwise identical XP VBA has had new constants added. ie a parameter that specifies a XP default and needs to be rem’ed out in order to work in W97.

      (3) ONE POSSIBLE PROBLEM … I suggest that when creating templates that need to function in both versions and you need different header/footers on the odd and even pages that you ensure that you create a ‘different first page’, never just odd/even pages.

      Frank Pasztor

    Viewing 15 replies - 61 through 75 (of 77 total)