Results 1 to 4 of 4
  1. #1
    Platinum Lounger
    Join Date
    Jan 2001
    Location
    Quedgeley, Gloucester, England
    Posts
    5,333
    Thanks
    0
    Thanked 1 Time in 1 Post

    Macros for beginners (Word 97 SR 2)

    I have a document in the form of an RTF file, on which I wish to run the following Word Macro (kindly written by Gary Frieder) [it could be ANY Word macro, of course]:

    Public Sub DeleteAllFrames()
    Dim n As Long
    For n = ActiveDocument.Frames.Count To 1 Step -1
    ActiveDocument.Frames(n).Select
    With Selection.ParagraphFormat
    .Borders(wdBorderLeft).LineStyle = wdLineStyleNone
    .Borders(wdBorderRight).LineStyle = wdLineStyleNone
    .Borders(wdBorderTop).LineStyle = wdLineStyleNone
    .Borders(wdBorderBottom).LineStyle = wdLineStyleNone
    End With
    ActiveDocument.Frames(n).Delete
    Next n
    End Sub

    Having used the macro editor once only in my life, I would be very grateful if someone could list step by step the <font color=blue>simplest way</font color=blue> of copying and running this macro once only (I would never need it again in that document, but might want to run it once each on a number of other documents). I would like to do this in a "minimally invasive" manner - by which I mean I would prefer not to save it in the document (if this is possible) or to assign to the keyboard or to a toolbar. Could the macro be run from an external file, perhaps?

    I suspect step 1 might be to save the original RTF document as a DOC - but what would be the simplest way of proceding from there?

    Thanks very much!

    John Gray
    <font face="Script MT Bold"><font color=blue><big><big>John</big></big></font color=blue></font face=script>

    Ita, esto, quidcumque...

  2. #2
    Silver Lounger Charles Kenyon's Avatar
    Join Date
    Jan 2001
    Location
    Sun Prairie, Wisconsin, Wisconsin, USA
    Posts
    2,048
    Thanks
    124
    Thanked 119 Times in 116 Posts

    Re: Macros for beginners (Word 97 SR 2)

    Hi John,

    You aren't the Mars & Venus guy are you?

    Anyway, you are right that you want to start with a Word document.

    Take a look at <A target="_blank" HREF=http://www.addbalance.com/word/macrosfromnewsgroup.htm> Macros and VBA from Newsgroups</A>. There are step-by-step instructions. If they don't make sense, please write back.

    Hope this helps,
    Charles Kyle Kenyon
    Madison, Wisconsin

  3. #3
    Platinum Lounger
    Join Date
    Jan 2001
    Location
    Quedgeley, Gloucester, England
    Posts
    5,333
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Macros for beginners (Word 97 SR 2)

    Chas

    NO - I thought that book was the biggest load of breathtaking rubbish that I've ever read, and I'm ashamed to have the same name as that guy!

    I will read through your website information, and thanks for the pointer! I presume that I cannot simply "run" the macro from an external file (which would be the simplest action from my point of view...).

    Thanks

    John
    <font face="Script MT Bold"><font color=blue><big><big>John</big></big></font color=blue></font face=script>

    Ita, esto, quidcumque...

  4. #4
    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: Macros for beginners (Word 97 SR 2)

    You can create a new template and store your seldom used macros in there. To activate them for use in other documents, go into Tools, Templates and Add-ins, and add them to the list of global templates. If they are not in one of your Startup folders, they will only load when you manually check the box.

Posting Permissions

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