Results 1 to 2 of 2

Thread: Word Macro Won't Run

  1. #1
    Join Date
    Feb 2012
    Location
    West Midlands, UK
    Posts
    1

    Word Macro Won't Run

    I am using Word 2007 with a mail-merge macro.
    I have used this macro quite succesfully on several previous occasions, but the last time I went to use it, it failed to load.

    My macro settings have all been correctly checked in the Trust Centre of Word.

    I create an Excel spreadsheet as my data source.
    I start Mailings in Word and choose Letter.
    I select my Excel data file.
    I insert the required merge fields.

    I make sure that Outlook 2007 is running. (A requirement of the Macro)

    I click the Macro to finalise the merge, at which point I am informed that my security settings in Word are preventing the macro from running.

    The settings, when checked at this oint, are set correctly, and I have tried all variations of these settings.

    I have completely reinstalled my Win 7 O/S, carried out a full re-install of Office 2007, but I am still getting the same result.

    Can anyone help me please?

    Thank you,

    Ian

  2. #2
    Join Date
    Dec 2007
    Posts
    2,291

    Re: Word Macro Won't Run

    I think i am not clear on whether you are trying to run the Word macro code against a Word document from within an Excel macro, or if you are trying to do a similar replacement to the contents of a range of cells in an Excel worksheet. If the later, you'll want something like this (which I simply recorded while doing an EDIT; REPLACE; REPLACE ALL while in Excel).

    Code:
    Sub Macro1() 
        Range("A1:E25").Select 
        Application.CutCopyMode = False 
        Selection.Replace What:="15", Replacement:="16", LookAt:=xlPart, _ 
        SearchOrder:=xlByRows, MatchCase:=False 
        Range("A1").Select 
    End Sub

Similar Threads

  1. VB Script To Run Macro from Word
    By jymoo in forum Software Development
    Replies: 3
    Last Post: 05-12-2011, 10:58 AM
  2. Ms Word Macro to suppress warnings
    By OmegaZiv in forum MS Office Support
    Replies: 1
    Last Post: 27-04-2011, 05:14 AM
  3. In Word 2007 edit macro is grayed out?
    By Manthan in forum Windows Software
    Replies: 2
    Last Post: 20-08-2009, 06:59 PM
  4. Macro for hyperlink on Word/Excel
    By Mindstorm in forum Windows Software
    Replies: 3
    Last Post: 07-05-2009, 03:13 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,491,678.14735 seconds with 17 queries