• WSfrankpasztor

    WSfrankpasztor

    @wsfrankpasztor

    Viewing 15 replies - 16 through 30 (of 77 total)
    Author
    Replies
    • in reply to: Find (not) styles (2002) #880362

      I guess this response falls into the whatever category.

      The attachment is a Word doc that carries a module that ‘colours’ documents. The background of it was a conversion /translation utility that
      cycled thro’ a docs paragraphs and changed the background color. This resulted in a starting document that was evenly coloured.

      As the translator ran it again cycled through the doc para by para, a successful conversion reset the paras color to auto, errors where then represented
      by other colors. The end result was a document where process used/failed/success where all clearly visible. This allowed users to carry out conversions
      over a number of sessions.

      And all without having to generate INI files to keep track of everything. Anyway, this module has a test sub that I hope is pretty self explanitory.
      It can either shade paras that contain a specified style or Not, It then has another function that carries out some action based on a paras colour.

    • in reply to: Find (not) styles (2002) #879819

      As far as I know crossfingers Word only allows a continuous(unbroken) range to be selected.
      If thats correct then there can’t be anyway to select all instances of a style, becouse the first break (other style) would break the selection.

      A work around would be messy, you would have to step through all paragraphs bookmarking( or entering into an array, etc) any paragraph
      that was of interest. Maybe changing font /shading colour to highlight the paragraphs.

    • in reply to: Find (not) styles (2002) #879820

      As far as I know crossfingers Word only allows a continuous(unbroken) range to be selected.
      If thats correct then there can’t be anyway to select all instances of a style, becouse the first break (other style) would break the selection.

      A work around would be messy, you would have to step through all paragraphs bookmarking( or entering into an array, etc) any paragraph
      that was of interest. Maybe changing font /shading colour to highlight the paragraphs.

    • oops blush I forgot to attach the Word Doc sorry …

    • oops blush I forgot to attach the Word Doc sorry …

    • I got it to work in Word 2003 by;
      In the form itself I used a commandbutton to launch it, and initialized objForm =Me

      Public objForm As Object

      Public Sub CommandButton1_Click()
      Me.txtInitials.Text = Module1.PopInitials(objForm.cboAuthor)
      End Sub

      In the Module, I made PopInitials a Public Function, passing it the Value of the combobox
      and returning the Initials to the calling routine.

      Public Function PopInitials(objForm As Object) As String

      sName = objForm

      I’m afraid that I’d never bothered passing a form’s name to a sub so I can’t comment
      on why its no longer working. I’ve attached the working example

    • I got it to work in Word 2003 by;
      In the form itself I used a commandbutton to launch it, and initialized objForm =Me

      Public objForm As Object

      Public Sub CommandButton1_Click()
      Me.txtInitials.Text = Module1.PopInitials(objForm.cboAuthor)
      End Sub

      In the Module, I made PopInitials a Public Function, passing it the Value of the combobox
      and returning the Initials to the calling routine.

      Public Function PopInitials(objForm As Object) As String

      sName = objForm

      I’m afraid that I’d never bothered passing a form’s name to a sub so I can’t comment
      on why its no longer working. I’ve attached the working example

    • in reply to: Macro to insert italicized ” ” (Word 2002) #867558

      What about using a button to toggle the state.
      For example;
      First press Checks a custom property if its ON or non-existant then create it and give it an ON value
      This coincides with the quotation marks/italics.

      Next press toggles this custom property to OFF … etc

    • in reply to: Macro to insert italicized ” ” (Word 2002) #867557

      What about using a button to toggle the state.
      For example;
      First press Checks a custom property if its ON or non-existant then create it and give it an ON value
      This coincides with the quotation marks/italics.

      Next press toggles this custom property to OFF … etc

    • in reply to: Validation on a Created Form (2000) #843063

      Just to add a thought to this post,

      In “Word for Dummies” terms, this is nice and ‘elegant’, but maybe a bit short on explaination.

      the line CheckBox1.Visible = (strChoice = “One”) means
      that IF the user selects the word “One” then (strChoice = “One”) is TRUE
      if the user chooses anything else then (strChoice = “One”) is FALSE

      CheckBox1.Visible decides whether you can see the CheckBox (TRUE) or not (FALSE)

    • in reply to: Validation on a Created Form (2000) #843064

      Just to add a thought to this post,

      In “Word for Dummies” terms, this is nice and ‘elegant’, but maybe a bit short on explaination.

      the line CheckBox1.Visible = (strChoice = “One”) means
      that IF the user selects the word “One” then (strChoice = “One”) is TRUE
      if the user chooses anything else then (strChoice = “One”) is FALSE

      CheckBox1.Visible decides whether you can see the CheckBox (TRUE) or not (FALSE)

    • in reply to: Replace styles and then some (Word 2000/XP) #843057

      Thats not an uncommon attitude for a user to take. I’ve found that nothing annoys a user more than a button that doesn’t appear to do anything.
      At least if they can see something happening they’ll (hopefully) abstain from bashing the keyboard unnecessarily.

      When I run macros that ‘move’ my insertion point I first bookmark the current position, I use the
      same bookmark name in all macros that need this ability

      ActiveDocument.Bookmarks.Add Range:=Selection.Range, Name:=”StartedHere”
      …… here’s the actual running code …..

      When the working code has completed its task I use goto to return to my original position
      Selection.GoTo What:=wdGoToBookmark, Name:=”StartedHere”

    • in reply to: Replace styles and then some (Word 2000/XP) #843058

      Thats not an uncommon attitude for a user to take. I’ve found that nothing annoys a user more than a button that doesn’t appear to do anything.
      At least if they can see something happening they’ll (hopefully) abstain from bashing the keyboard unnecessarily.

      When I run macros that ‘move’ my insertion point I first bookmark the current position, I use the
      same bookmark name in all macros that need this ability

      ActiveDocument.Bookmarks.Add Range:=Selection.Range, Name:=”StartedHere”
      …… here’s the actual running code …..

      When the working code has completed its task I use goto to return to my original position
      Selection.GoTo What:=wdGoToBookmark, Name:=”StartedHere”

    • in reply to: Word styles (W97 & WXP) #818788

      Greetings,
      Firstly I agree completely with your views on avoiding the inbuilt Heading styles and either start from no style, or a specifically created inhouse base style.

      If you have documents that now contain paragraphs with the same paragraph style name but use different fonts/formatting then try doing a global find/replace.
      This should replace all instances with the style stored in your own template. I say should becouse any numbered styles are likely to misbehave so back up your
      docs before doing anything you might later regret.

    • in reply to: Word styles (W97 & WXP) #818789

      Greetings,
      Firstly I agree completely with your views on avoiding the inbuilt Heading styles and either start from no style, or a specifically created inhouse base style.

      If you have documents that now contain paragraphs with the same paragraph style name but use different fonts/formatting then try doing a global find/replace.
      This should replace all instances with the style stored in your own template. I say should becouse any numbered styles are likely to misbehave so back up your
      docs before doing anything you might later regret.

    Viewing 15 replies - 16 through 30 (of 77 total)