• Andrew Lockton

    Andrew Lockton

    @andrew-lockton

    Viewing 15 replies - 4,156 through 4,170 (of 4,199 total)
    Author
    Replies
    • in reply to: Keep Caption with Figure #511066

      musab

      You put a style on the graphic itself and use ‘Keep with Next’ on that paragraph instead of doing anything to the Caption style. The Caption style should NOT have ‘Keep with Next’ on.

    • in reply to: rotating .emf images #1776337

      Use a graphics tool to import then rotate the .emf files and then resave as emf and then import into Word. I would use Corel Draw or Visio but Powerpoint may be able to do the job for you. EMF is an enhanced Metafile so pretty well every graphic editor on Windows will read the file. You may have to ungroup it and then regroup it for Powerpoint to handle the rotation.

      I would be loath to rotate a map as I always expect to see North pointing up. Another option would be to shrink the map or crop it (in Word or in the GIS tool) to make it a more upright aspect ratio and show the detail you require.

    • in reply to: Why is Restart Numbering grayed out? #1776332

      Record a macro of you visiting the numbering dialog and defining an outline level list with styles attached to at least the first three levels and making the list restart.

      Now instead of using the style (which you can do as well, if the numbers need to continue) you can run the macro to control the list gallery and apply the style and restart the list all in one action.

    • in reply to: Macro Delete #1776331

      Put your macro in a global add-in instead of the file. Then there is no stripping to do. In any case a macro which wipes itself is hardly going to execute to completion (although it would be great for virus writers).

      On your work process I would try to find a better way to do this as it seems an awful lot of work to get a single slide out to the masses. Are you not on a network with the users? Can you store/edit the slides separately and build your master file only when you need it by inserting all the files?

    • in reply to: Tracking Changes #510990

      Have a look in Tools > Track Changes > Highlight Changes > Options and change the colours to “By Author”

      Or Review the edits and you are told who made each change.

    • in reply to: Document Corruption #1776322

      Its a method, not a macro – although it could be made into one. It works because of an oddity I have not yet discovered the key to. If I copy a large chuck of the problem file into a new file then the metadata lists come also. If I copy each part of the document in small enough chunks then the metadata lists get left behind. The problem is “Small enough” chunks defy definition. It can be as large as 10+ pages or as small as 2-3 pages. The only way to know is to paste a chunk and do a list count by running the earlier macro.

      In Word97/2000 to remove the spurious lists I have:
      1. Open the problem file (call it F1) and a new blank file based on the same template (call it F2)
      2. Check the list count in F2 and make sure it is low or zero. If not you have to start with a new blank file and attach the template and update the styles.
      3. Copy pages 1-5 from F1 into F2
      4. Run the macro and check the list count hasn’t shot up.
      5A. If the list count is low – Save F2 and repeat step 3 on the next chunk.
      5B. If the list count is high – Close F2 without saving, reopen the F2 and try step 3 with a smaller chunk.

      When you get impatient and start taking bigger and bigger chunks you will fall into step 5B. I couldn’t be bothered making a macro to do this although it probably wouldnt be too hard. I run both Word95 and Word97 for problems exactly like this and that is easier for me.

    • in reply to: Open a Document as a Copy #1776317

      Something to try is to use the Documents.Add to open a copy and read the bookmark names. Make sure you don’t set the link to this temporary file though or the link won’t stay for long.

      Documents.Add Template:=strRequirementsDocument, NewTemplate:=False

      Are you showing the content of each bookmark or just the names? The code sounds very useful and I would be interested in how it turns out. Can you post it when done?

      I suspect you have to open a file in order to read bookmarks and contents and I know of no other way to cross-reference between documents. Perhaps adding cross refs in a Master Document whilst people edit the sub-documents would work but would be fraught with Danger.

    • in reply to: Turning docs into pages #1776315

      I will make a value judgement and assume you are fresh to Word so I won’t bother to provide a macro that you may not know how to implement.

      A way to combine them one at a time without copy/pasting is
      1. Open the file (Page 1) and position your cursor at the end of the file on a blank line.
      2. Choose Insert>File…
      3. Select the next file in the series (page 2) and click OK
      4. Press F4, select next file and click OK
      5. Repeat step 4 until all files are in there.

      Now rush out and buy “Word 97 Annoyances” by Woody Leonhard and read everything. (PS it won’t matter that you have Word 2000 – but it will if you have Word 6)

    • in reply to: AutoText Exists #510967

      Kevin, do you ever get the feeling you are talking to yourself?

      Use this code and modify it as many times as all of you want. Feel free if each of you want to post your answers.

      Dim Entry
      ‘Form types listing – Autofill the list with Autotexts in template
      For Each Entry In ActiveDocument.AttachedTemplate.AutoTextEntries
      Me.FormTypeLB.AddItem Entry.Name
      Next Entry

    • in reply to: Insert Picture #510944

      I agree with Geoff, the LinkToFile appears not to work. A way around that bug is to capture the filename and use that in a separate command such as

      Code:
      Sub temp2()
      Dim sFilePath As String
      With Dialogs(wdDialogInsertPicture)
        .Display
        sFilePath = .NAME
      End With
      MsgBox sFilePath & " is being linked into the file."
      ActiveDocument.InlineShapes.AddPicture sFilePath, True, False
      End Sub

      I wouldn’t hijack the InsertPicture command to do this though as you will eventually return to the fold and want to embed the graphic. You can get rid of the MsgBox line if you like.

    • in reply to: Document Corruption #1776200

      My theory (it is only a theory) is the defined (not actual) numbered lists in the document have grown to a huge number and there is no way in VBA to clear this metadata. This appears to be incremented every time a user visits the list gallery and copying and pasting large blocks of text adds the two files together etc. Over the life of text the number grows larger than you could imagine. I have seen around ~1,960 in documents that give that error message. You will discover that you can delete the entire content of the file and still have a huge number of lists in the metadata.

      The way I get rid of them is to save the document down into Word 95 format and then open it and save it in Word 95. Now you can bring it back without the extra metadata. Note: you must open the file with Word 95 as that is the crucial step.

      You can find out how many defined numbered lists are in the file by running the following code

      Sub ListCount()
      '  Dim listgal, i
        Dim sList As String
        sList = "Template Lists = " & ActiveDocument.AttachedTemplate.ListTemplates.count & vbCr
        sList = sList & "Document Lists = " & ActiveDocument.ListTemplates.count
        MsgBox sList
      End Sub

      If you can’t lay your hands on a copy of Word95 let me know and I will describe a method for cleaning within Word97/2000.

    • in reply to: Form linked to opening of report #510695

      I think what is happening is the value of the control is not set until the focus leaves the control. I haven’t worked out how to accept the value any other way so I always have to get around this by moving the focus a couple of times before running with data off the form eg.
      DoCmd.GoToControl “Ctrl1”
      DoCmd.GoToControl “Ctrl2”

    • in reply to: Adding n Switch To Hyperlinks #510653

      Gary (F)

      Do you remember the code we posted on ye olde lounge to activate a menu item we couldn’t call the right way? I posted one using numbers and you came up with a constant name that was a more bullet-proof. I reckon that same code would do the job here but I can’t remember it or find it or remember it (and I’ll tell you another thing – my memory’s not real good either).

      Gary H may have reassigned his Control-K, I know I have.

    • in reply to: Profile Wizard #510540

      Don’t tell me you are trying to break your own rules.

      I don’t use a profile wizard but I get my own settings to a new machine by recording a macro in which I visit the Tools > Options and click on each of the tabs in there. This creates a huge list of code which can be run on the new machine to set all my favourite settings.

      All you need to do is then take the template along with you and then run that macro to create all your settings.

      This same work practice could be used to change settings after the network nazi’s trample over your personal settings.

    • in reply to: Word time trip #510539

      I don’t suppose you have tracked revisions or been playing with the Versions control.

    Viewing 15 replies - 4,156 through 4,170 (of 4,199 total)