Help with multiple macros

J

JayKay953

I've upgraded from Office 2003 to 2007. I have figured out how to install my
old macros and have one of them as a button on the ribbon. When I tried to
put another one on the ribbon and use it, the first macro comes up. Any
suggestions?
 
L

Lene Fredborg

Have you added the buttons to the Quick Access Toolbar (QAT)?

In that case, go back to Office button > Word Options > Customize and check.
You may have selected the wrong macro when adding it to the QAT.

--
Regards
Lene Fredborg - Microsoft MVP (Word)
DocTools - Denmark
www.thedoctools.com
Document automation - add-ins, macros and templates for Microsoft Word
 
J

JayKay953

Yes, that's where the problem comes in. I've checked to make sure the right
macros are added. The first macro I added to the quick access toolbar works
fine. The second one and subsequent ones just bring up the first macro.
 
L

Lene Fredborg

Have you checked in the Visual Basic Editor (Alt+F11) whether each of your
macros contains the correct content?

If that does not help finding the problem, it may be helpful to include the
macros here.

--
Regards
Lene Fredborg - Microsoft MVP (Word)
DocTools - Denmark
www.thedoctools.com
Document automation - add-ins, macros and templates for Microsoft Word
 
J

JayKay953

Here's one


Rem Bookseller - Creative Computing
Rem The following macro automates the merging of data exported by Bookseller
with the Word templates.

Public Sub MAIN()
WordBasic.ScreenUpdating 0
WordBasic.EditFindClearFormatting
WordBasic.EditReplaceClearFormatting
WordBasic.PrintStatusBar "Please wait... processing Catalogue"

Rem If you have installed Bookseller in a different directory/folder you
will have to edit the path in the line below to indicate the location of the
file Cat-10pt.dot.

WordBasic.FileOpen Name:="C:\Booksell\Wordfile\BKSWeb.dot",
ConfirmConversions:=1, ReadOnly:=1
WordBasic.MailMerge CheckErrors:=1, Destination:=0, MergeRecords:=0,
Suppression:=0, MailMerge:=1

Rem Carriage returns within Bookseller fields are imported into Word as new
line characters (ASCII 11). The following steps converts these to carriage
returns (ASCII 13) and undo any additional paragraph formatting which may be
transferred to the section f
'ollowing the carriage return.

WordBasic.StartOfDocument

WordBasic.EditFind Find:="^l", Direction:=0, Wrap:=2

While WordBasic.EditFindFound()
WordBasic.InsertPara
WordBasic.FormatParagraph Before:="0 pt", After:="0 pt", FirstIndent:="0cm"
WordBasic.RepeatFind
Wend

Rem Following lines convert Author placeholder spaces to tabs for consistent
alignment. Then the placeholder is removed from the Index field to stop the
dash being indexed. Hidden text must be switched on to remove the hidden
index fields.
WordBasic.StartOfDocument
WordBasic.ShowAll 0

WordBasic.EditReplaceTabs Position:="2 cm", Align:=0, Leader:=0
WordBasic.EditReplace Find:="—— ", Replace:="——^t", Direction:=0,
ReplaceAll:=1, Format:=1, Wrap:=1

WordBasic.ShowAll 1
WordBasic.EditReplace Find:=Chr(34) + "—— " + Chr(34), Replace:="",
Direction:=0, ReplaceAll:=1

WordBasic.ShowAll 0
WordBasic.ViewFieldCodes 0
WordBasic.StartOfDocument

Rem The next steps open the template and closes it. Only the new catalogue
document will remain open.
WordBasic.FileOpen Name:="C:\Booksell\Wordfile\BKSWeb.dot"
WordBasic.FileClose (2)
WordBasic.ScreenUpdating 1

Rem The following lines can be deleted (as far as 'End Sub').
WordBasic.MsgBox "Your catalogue is now ready for editing or printing. To
alter the font size of the whole document, select all the text (Ctrl+A) and
press either < or >, while holding down Ctrl+Shift.", " Standard Catalogue
(10pt)", 64

End Sub
 
L

Lene Fredborg

Thank you for posting the macro. Unfortunately, it does not give me other
ideas of what could be wrong. I am afraid that in addition to the suggestions
in my previous posts, I currently have no other ideas of what could cause the
problem.

I think I would try to delete the QAT buttons and add them again just to
make sure that I had not overlooked a mistake of some kind. If the problem
persists, I hope somebody else can help.

--
Regards
Lene Fredborg - Microsoft MVP (Word)
DocTools - Denmark
www.thedoctools.com
Document automation - add-ins, macros and templates for Microsoft Word
 
J

JayKay953

Thank you. I am equally frustrated and considering going back to Word 2003
where everything worked just fine. If by some chance I figure this out, I
will post my solution.

--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top