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?
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).
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
Education, Career and Job Discussions
|Tags: excel spreadsheet, macro, microsoft word, outlook 2007, word 2007|
|Thread Tools||Search this Thread|
|Similar Threads for: "Word Macro Won't Run"|
|Thread||Thread Starter||Forum||Replies||Last Post|
|VB Script To Run Macro from Word||jymoo||Software Development||3||05-12-2011 10:58 AM|
|Ms Word Macro to suppress warnings||OmegaZiv||MS Office Support||1||27-04-2011 05:14 AM|
|In Word 2007 edit macro is grayed out?||Manthan||Windows Software||2||20-08-2009 06:59 PM|
|Macro for hyperlink on Word/Excel||Mindstorm||Windows Software||3||07-05-2009 03:13 PM|