• WSKlaus Linke

    WSKlaus Linke

    @wsklaus-linke

    Viewing 15 replies - 1 through 15 (of 990 total)
    Author
    Replies
    • in reply to: Font search parameters in Word 2003 (Word 2003 SP #1074034

      It probably has to do with language support for some exotic languages … something about OpenType Layout Tables.

      Simple fonts don’t have these tables, but the bigger fonts that contain Hebrew, Arab, Asian… glyphs do.
      If I understand these issues correctly (not sure), these fonts are mapped by Word.
      In effect the layout tables are handles as if they were different fonts: One for Latin/western (Ascii) text, one for bidirectional (Hebrew or Arab) text, one for Asian text, and one for other complex scripts.

      The work-around if this leads to problems is to use Font.NameAscii instead of Font.Name in the macro.
      I saw the original poster already got that info in the MS newsgroups… just for the record here, in case somebody else stumbles on this issue.

      cheers Klaus

    • Not sure about best practices, but this should work:

      myRange.MoveStartUntil CSet:=Chr(19), Count:=wdBackward
      myRange.MoveStart Unit:=wdCharacter, Count:=-1
      myRange.Collapse (wdCollapseStart)

      It moves the cursor to the left until it finds the code of an opening field brace ^19, then one character more.
      I imagine it’s hard to impossible to do using only Field.Code or Field.Result, since some types of fields have (or can have) one of those, or the other, or both.

      cheers Klaus

    • in reply to: Document map inclusion criteria (Word XP) #1056019

      Relevant is the outline level (Format > Paragraph).
      If she assigns an outline level other than “Body text”, the style(s) should appear in the Document Map.

      cheers Klaus

    • in reply to: Word Shortcut keys and menus (Word 2002 XP SR3) #1053128

      I guess the default “FileSave” and “FileClose” buttons in the template have been deleted, and replaced with custom macro buttons.

      A better way (that would have retained the “Shift+File menu” functionality) would have been not to touch the built-in controls (menu buttons), and to intercept the built-in commands with macros of the same name (“FileClose”, “FileSave”, “FileCloseAll”, “FileSaveAll”).

      Perhaps you can rewrite the template along those lines?

      cheers Klaus

    • in reply to: Text with Line Breaks (Word 2003 ) #1044532

      And if you start Word in safe mode (hold the Ctrl key while starting Word), does it work then?
      (You’ll have to re-check Tools > Options > General > Confirm conversion on open)

      Might be an add-in…

      cheers Klaus

    • in reply to: VBA Find Hidden Text Won’t! (Word 2003) #1039223

      > I’m assuming that it works precisely because the settings are (still) NOT sticky and it’s toggling it on?

      Yes, something like that. Word seems to be confused about what’s hidden and what’s not when the first character is hidden, and wdToggle is just something that seems to work around that bug.
      If you are writing a professional app, you might do something more elaborate to work around it (… say verify that what you think you found is hidden text really is).

      The work-around would probably blow up in your face if MS ever decides to fix the bug. Not that that is too likely…

      cheers Klaus

    • in reply to: VBA Find Hidden Text Won’t! (Word 2003) #1038802

      It’s a bug that was discussed somewhere on the Lounge before, I think.

      IIRC, it depends on whether the first character in the document is hidden or not?

      One work-around was to use .Font.Hidden = wdToggle (instead of = True). Not really good code, but simple.

      cheers Klaus

    • in reply to: Find/Replace tabs (2002/SR2) #1037482

      I have seen that when the dialog was opened by a macro.
      And whether it behaves in that way depends on how you write the macro … Dialogs().Show versus CommandBars.FindControl().Execute, so it can be avoided.

      Maybe EditGoto has been replaced by a macro on your machine?

      cheers Klaus

    • Very possible, as I didn’t use it. Sorry for the red heering then!

      cheers Klaus

    • You could look if you find something in “All Programs > Microsoft Office > Microsoft Office Tools > Microsoft Office Language Settings”.
      I haven’t used Word97, but if the customization was done by a MUI pack, you might find a (Danish) setting there.

      cheers Klaus

    • in reply to: auto update styles (Word 2003) #1031850

      The new linked styles (= styles that are both “Paragraph and Character” styles at the same time) are a giant nuisance.

      They are created automatically when you apply any paragraph style while you have only part of a paragraph selected (usually by acident).
      In the new version 2007, many of the built-in styles will automatically be linked styles.

      In versions up to 2003, you can get rid of them, though it is difficult to achieve without loosing some formatting. Maybe you can find macros to achieve that by searching the Lounge…
      I’ll paste the one I use (based on a macro by Cindy Meister) below.

      Since in Word2007, you will no longer be able to get rid of them at all, it might not be worth the trouble to fight them.

      There are loads of problems with linked styles. The one you have run in is that the two linked styles (one paragraph style and one character style sharing the same name) can have contradicting font formatting.
      That is probably a bug.

      I have for example just edited a document that had about half the paragraphs in style XY showing as 10 pt font size, the other half as 16 pt font size.
      The paragraph style’s font size was defined as 10 pt, but the linked character style (which does not show in the styles pane or styles control) had 16 pt.

      The solution to fix that (without loosing a lot of other manually applied font formatting) was like this:
      Change to the VBA editor (Alt+F11),
      open the immediate window (Ctrl+G),
      with some text selected that shows the weird formatting (the 16 pt font size in my example above), run the line

      ? Selection.Style

      If there’s a linked style applied as a character style, you’ll get the styles name followed by “Char” (or by “Zchn” in the German version, “Car” in the Spanish …).

      If it is a char style, then to fix the problem, I run the line
      Selection.Style.Font.Size=Selection.Paragraphs(1).Style.Font.Size
      or alternatively
      Selection.Style.Font.Size=Selection.Style.LinkStyle.Font.Size
      which set the size of the character style to that of the linked paragraph style.

      Or corresponding code for other font formatting other than the size…

      cheers Klaus

      edited… had posted an old version by accident

      Sub ShowLinkStylesUnlink()
        ' Based on one of Cindy Meister's macros
        ' (any bugs are mine)
        Dim myStyle As Style
        Dim myStyleLinkedStyle As Style
        ' On Error Resume Next
        For Each myStyle In ActiveDocument.Styles
          If myStyle.Type = wdStyleTypeCharacter Then
            Set myStyleLinkedStyle = myStyle.LinkStyle
            If myStyleLinkedStyle  _
                ActiveDocument.Styles(wdStyleNormal) Then
               If myStyleLinkedStyle.LinkStyle = myStyle Then
                  Select Case MsgBox("The " & _
                  StyleType(myStyle.NameLocal) & _
                      " " & Chr(34) & myStyle.NameLocal & Chr(34) & _
                      " is linked to " & StyleType(myStyle.LinkStyle) & _
                      " " & Chr(34) & myStyle.LinkStyle & Chr(34) & _
                      ". " & vbCr _
                      & "Unlink?", _
                      vbYesNoCancel + vbInformation, "Styles linked:")
                      Case vbYes
                          myStyle.LinkStyle = ActiveDocument.Styles("Standard")
                          myStyleLinkedStyle.LinkStyle = ActiveDocument.Styles("Standard")
                          If myStyle.LinkStyle  _
                              ActiveDocument.Styles(wdStyleNormal) Or _
                              myStyleLinkedStyle.LinkStyle  _
                              ActiveDocument.Styles(wdStyleNormal) Then
                              MsgBox "Didn't work!", vbCritical
                          End If
                      Case vbNo
                      Case vbCancel
                          Exit Sub
                  End Select
               End If
            End If
          End If
        Next myStyle
      End Sub
    • in reply to: Special symbols (Word 2000) #1030310

      The font is probably “Times New Roman”? I’ve never found out what these “private use” characters are for, either.
      The combining diacritics don’t work too well in most TrueType fonts… Maybe they just added a few alternatives so you can center the dot below characters of different width.

      cheers Klaus

    • in reply to: Gremlins changing outline level (Word 2002 SP-2) #1028823

      > If I use Select All ^A, followed by Reset Paragraph, will this fix all the outline levels without affecting any character formatting?

      Yes, if you don’t mind to remove manual paragraph formatting.
      Say “page break before” or “keep with next” (which I pretty often use to force nice pagebreaks).
      Or manual restarts (on numbered paragraph styles).
      Or all the numbering (if it wasn’t applied through a style).

      cheers Klaus

    • in reply to: Blank line after table (2003) #1023222

      I also sometimes use a hidden paragraph mark (Format > Font > Hidden) after the table (say, also to “merge” two tables visually).
      Some people don’t like this solution however — some because they don’t like hidden text at all, some because they think hidden paragraph marks cause trouble (corruption).

      cheers Klaus

    • in reply to: Replacing with Special Characters (2003) #1023117

      Strange, your macro works well on your sample doc for me (Word 2003). There is an empty bookmark “QuickMark” between the space and the paragraph mark… Perhaps that messes things up in your version.

      cheers Klaus

    Viewing 15 replies - 1 through 15 (of 990 total)