Page 1 of 3 123 LastLast
Results 1 to 15 of 31
  1. #1
    Lounger
    Join Date
    Jun 2002
    Location
    New Mexico
    Posts
    32
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Deleting Unneeded Macros (97 latest)

    Dear fellow Loungers:

    I've been having remarkable success dictating into Word97 with Dragon Naturally Speaking 6, with one exception. The accuracy is quite remarkable, but apparently, the more macros you have in Word, the fewer editing and correcting features of Dragon are available to you when dictating into Word. I'm therefore very interested in deleting the largest number of Word macros that I can, without deleting anything that could be fatal.

    I can tell what most of the macros do just by looking at their titles, but some are a bit more arcane. I'm wondering if anyone is aware of a list of macros that must not be deleted. I also would welcome any other comments that would guide me in this streamlining effort, such as the best way to tackle such a humongous deletion project, and/or how best to create an alternative macro-stripped version of Word for use only when I dictate into Dragon.

    Thanks to one and all.

    Herb Silverberg

  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: Deleting Unneeded Macros (97 latest)

    Word doesn't come with any macros whatsoever! You might check your global templates and add-ins, or should I say, uncheck them and see if you can live without their functionality. That could explain a few of them. You also could rename your Normal.dot template (e.g., wasNormal.dot) and Word will create a new one without any macros. And, unfortunately, without a lot of your customizations, but you can always switch back if something essential is missing. Last but not least, you also could open the macro editor (Visual Basic editor) and glance at the macro code and see (1) where it lives, and (2) what it does. You then could be more selective in your pruning. I wouldn't rule out the possibility that some of them are Dragon's own macros.

  3. #3
    Lounger
    Join Date
    Jun 2002
    Location
    New Mexico
    Posts
    32
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Deleting Unneeded Macros (97 latest)

    Thanks for the reply. S'funny, but I thought that nearly everything Word did was via macros.

    Perhaps I'm just confusing the terms, but as I look at Tools|Customize|Commands for NORMAL.DOT, it seems obvious that this intergral part of Word is laden with macros that do everything from AllCaps to WordUnderline.

    So if I've misused the word "macros" and should have said "VBA Scripts," and if I should have said "NORMAL.DOT, a seemingly integral part of Word as it comes out of the box," rather than just "Word," pehaps I can be forgiven for the gaffe and we can get on with my quest, which is to free Word [oops -- NORMAL.DOT] from exotic sorts of things that I don't really need to do my daily work.

    For example, I doubt I'd want to part with the macro [oops, VBA Script] that lets me open a new document, but I'd have no problem losing the WordUnderline function, because I never use it.

    My rather clumsy request simply sought to elicit from anyone who may have undertaken this task for any reason, a "bare bones" version of NORMAL.DOT that makes Word act more like NotePad than Word, but still lets it act more like Word than Notepad.

    I guess I'm gonna hafta scale this peak myself.

    Herb Silverberg

  4. #4
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    New York
    Posts
    214
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Deleting Unneeded Macros (97 latest)

    What you are looking at are the Built-In commands -- things like FileNew and All Caps.

    These are not the same as a user created "module" or what was known in the WordBasic days as a "Macro."

    They cannot be deleted.

    The confusion may come from the fact that they are listed in Tools Macro. This is an integral part of Word's customizabilty. But if anyone has suggested that these macros can be deleted, they are leading you astray.

    They are listed here because -- yes -- every internal command (almost) is exposed to the user as replaceable. That is, if I create a macro FileNew -- it will fire before the internal FileNew.

    Perhaps you are being told that if there are "replacement" commands -- like a user created FileNew -- then the dictation software won't be able to do FileNew.

    What can be deleted is any custom macro that resides in Normal.dot. Or anything that's in Startup. The former by simply deleting via Tools Macro. The latter by removing the DOT file from the Startup folder.

  5. #5
    5 Star Lounger
    Join Date
    May 2001
    Location
    Stuttgart, Baden-W, Germany
    Posts
    931
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Deleting Unneeded Macros (97 latest)

    To give an example of what Guy described:
    You can replace the command FileNew with your own macro:
    <pre>Sub FileNew()
    MsgBox "FileNew"
    End Sub</pre>


    If you choose "File > New" from the menu or use the keyboard shortcut Ctrl+N, your macro will run.

    But this won't "delete" the built-in command (that resides somewhere in Winword.exe or some *.dll).
    You (or the dictation software) can still use the built-in command:
    <pre>Sub myFileNew()
    WordBasic.FileNew
    End Sub</pre>

    or use the corresponding VBA function
    <pre> Documents.Add</pre>


    If Dragon runs out of ressources, you might try to work in Normal view, turn off background spell checking and other ressource hogs.

    <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>Klaus

  6. #6
    Gold Lounger
    Join Date
    Dec 2000
    Location
    New Hampshire, USA
    Posts
    3,386
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Deleting Unneeded Macros (97 latest)

    Commands used via the WordBasic object are not necessarily functionally the same as the corresponding VBA commands.

  7. #7
    5 Star Lounger
    Join Date
    May 2001
    Location
    Stuttgart, Baden-W, Germany
    Posts
    931
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Deleting Unneeded Macros (97 latest)

    Hi Howard,

    Not that I don't believe you, but do you have some examples?

    (Edited) On re-reading your post, perhaps I misunderstood you. I thought you meant that the built-in command XXX doesn't always do the same thing as "WordBasic.XXX".
    Perhaps you meant that there isn't necessarily a VBA equivalent for every Word command? Then I agree very much.

    <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>Klaus

  8. #8
    Gold Lounger
    Join Date
    Dec 2000
    Location
    New Hampshire, USA
    Posts
    3,386
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Deleting Unneeded Macros (97 latest)

    The Word commands listed in the Tools Macros menu have nothing to do with WordBasic, they are really more related to the built-in Word Dialogs and can be thought of as built-in VBA macros.

    For example, InsertCrossReference gives you the Word 8/9/10 dialog, not the corresponding Word 6/7 dialog.

    And the following is invalid:

    WordBasic.InsertCrossReference

  9. #9
    5 Star Lounger
    Join Date
    May 2001
    Location
    Stuttgart, Baden-W, Germany
    Posts
    931
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Deleting Unneeded Macros (97 latest)

    Hi Howard,

    > The Word commands listed in the Tools Macros menu have nothing to do with WordBasic[...]

    Try to record the built-in commands:
    <table border=1><td>Command</td> <td>recorded code</td><td>AppMaximize</td> <td>WordBasic.AppMaximize</td><td>DecreaseIndent</td> <td>WordBasic.DecreaseIndent</td><td>DrawBrace</td> <td>WordBasic.DrawBrace</td><td>InsertDrawing</td> <td>WordBasic.InsertDrawing</td><td>OK</td> <td>WordBasic.OK</td><td>ShowAllConsistency</td> <td>WordBasic.ShowAllConsistency</td><td>Style</td> <td>WordBasic.Style</td><td>ViewSecurity</td> <td>WordBasic.ViewSecurity</td><td>WebOpenStartPage</td> <td>WordBasic.WebOpenStartPage</td></table>I think I see a pattern there <img src=/S/wink.gif border=0 alt=wink width=15 height=15>

    Commands that do record VBA code (always?) work just as well with WordBasic.XXX:

    <table border=1><td>Command</td> <td>recorded code</td> <td>works, too</td><td>UnHang</td> <td>Selection.ParagraphFormat.TabHangingIndent -1</td> <td>WordBasic.UnHang</td><td>ViewWeb</td> <td>ActiveWindow.View.Type = wdWebView</td> <td>WordBasic.ViewWeb</td><td>UpdateFields</td> <td>Selection.Fields.Update</td> <td>WordBasic.UpdateFields</td><td>ToolsOptions</td> <td>Dialogs(wdDialogToolsOptions).Show</td> <td>WordBasic.ToolsOptions</td></table>

    > For example, InsertCrossReference gives you the Word 8/9/10 dialog, not the corresponding Word 6/7 dialog.

    Sorry? Why should it? <img src=/S/shrug.gif border=0 alt=shrug width=39 height=15>


    > And the following is invalid:
    > WordBasic.InsertCrossReference


    What about that?
    <pre>WordBasic.InsertCrossReference ReferenceType:="Bookmark", ReferenceKind:="1", ReferenceItem:="Test"</pre>

    Commands corresponding to Dialogs often execute directly when called via the WordBasic Object, and you have to supply the corresponding parameters.
    Saying that they are not related seems a bit harsh <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

    <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>Klaus

  10. #10
    Gold Lounger
    Join Date
    Dec 2000
    Location
    New Hampshire, USA
    Posts
    3,386
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Deleting Unneeded Macros (97 latest)

    Again, critters with the same name are not necessarily the same.

    Application.Run "InsertCrossReference" brings up the Word 8/9/10 version of the Insert Cross-reference dialog.

    WordBasic.InsertCrossReference, with appropriate args, inserts a cross reference, BUT is limited to using the Word 6/7 values.

  11. #11
    5 Star Lounger
    Join Date
    May 2001
    Location
    Stuttgart, Baden-W, Germany
    Posts
    931
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Deleting Unneeded Macros (97 latest)

    The VBA help has a page with the parameters for most dialogs:
    <table border=1><td>wdDialogInsertCrossReference</td> <td>ReferenceType, ReferenceKind, ReferenceItem, InsertAsHyperLink, InsertPosition</td></table>I'm not the only one who has complained that the types of the parameters and allowed values aren't properly documented.
    But it's a problem of documentation, not a limitation of the WordBasic Object.
    If you use
    <pre>WordBasic.InsertCrossReference ReferenceType:="Bookmark", ReferenceKind:="1", _
    ReferenceItem:="Test", InsertAsHyperlink:=True
    WordBasic.InsertCrossReference ReferenceType:="Bookmark", ReferenceKind:="1", _
    ReferenceItem:="Test", InsertAsHyperlink:=False</pre>

    the cross reference will be inserted with/without the h switch (which, as far as I know, is a new feature).

    <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>Klaus

  12. #12
    Gold Lounger
    Join Date
    Dec 2000
    Location
    New Hampshire, USA
    Posts
    3,386
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Deleting Unneeded Macros (97 latest)

    The WordBasic.InsertCrossReference does not suppotr ANY of the options added in Word, 8 and up for the Insert Cross-reference menu.

    Ditto for ALL other WordBasic. commands.

  13. #13
    5 Star Lounger
    Join Date
    May 2001
    Location
    Stuttgart, Baden-W, Germany
    Posts
    931
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Deleting Unneeded Macros (97 latest)

    <hr>The WordBasic.InsertCrossReference does not suppotr ANY of the options added in Word, 8 and up for the Insert Cross-reference menu.<hr>
    Then either you are saying that "InsertAsHyperlink" was available in Word95, or that my example code doesn't work. Which is it?

    <hr>Ditto for ALL other WordBasic. commands.<hr>
    We coulnd't differ more. Even though generalizations are a dangerous thing, I'd say that every single thing you can do from the user interface is done with the WordBasic Object (including new features), and that VBA is only an afterthought.

    Two more examples:
    I didn't use Word95/97, but I think RGB colors are new.
    Make a table and run

    <pre>Dim myColor As Long
    myColor = RGB(121, 57, 190)
    WordBasic.FormatBordersAndShading BackgroundRGB:=myColor</pre>


    Nested tables are new.
    Create a table with nested tables and run
    <pre>WordBasic.TableToText ConvertTo:=1, NestedTables:=False</pre>

    then undo and run
    <pre>WordBasic.TableToText ConvertTo:=1, NestedTables:=True</pre>


    <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>Klaus

  14. #14
    Gold Lounger
    Join Date
    Dec 2000
    Location
    New Hampshire, USA
    Posts
    3,386
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Deleting Unneeded Macros (97 latest)

    I've already given 1 example of something that can be done from th eGUI, but cannot be done using the WordBasic object, i.e., the GUI provides more options for InsertCrossReference than does WordBasic.InsertCrossReference.

    I need not say any more.

  15. #15
    5 Star Lounger
    Join Date
    May 2001
    Location
    Stuttgart, Baden-W, Germany
    Posts
    931
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Deleting Unneeded Macros (97 latest)

    <hr>I need not say any more<hr>

    Oh Howard, please do.

    You didn't reply twice to my code showing that WordBasic.InsertCrossReference with the new options does work.

    Insert a bookmark "Test" anywhere, and run
    <pre>WordBasic.InsertCrossReference _
    ReferenceType:="Bookmark", _
    ReferenceKind:="1", _
    ReferenceItem:="Test", _
    InsertAsHyperlink:=True, _
    InsertPosition:=False</pre>

    That are exactly the same options that the UI and VBA have.

    <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>Klaus

Page 1 of 3 123 LastLast

Posting Permissions

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