Message box

M

Margaret Upton

I am using Word 2007 which I cannot put up menus to run macros as you could
in the 2003 version. As I am no programmer !! I cannot get my head around
the ribbon, I downloaded one which you could put macros on and I cannot
manage it. In the old version I used the code below for a yes no box.
Would it be possible to add something to it that would bring up a box that
would list some macros using this method. The code I used below (that
someone gave me years ago) to bring up different save options. Have tried
putting in Application.Run MacroName:="macro name" in various places and
that does not work, and of course I cannot get multiple yes/ no choices in
the same menu. If anyone can make sense of this, could they help please.

Dim intMsgBoxResult As Integer
intMsgBoxResult = MsgBox("Click Yes for town or No for Country", vbYesNo + _
vbQuestion, "Current Status")
If intMsgBoxResult = vbYes Then

With Dialogs(wdDialogFileSaveAs)
.Name = "n:\Town Details 2003\"
.Show
End With

Else

With Dialogs(wdDialogFileSaveAs)
.Name = "n:\Country Details 2003\"
.Show

End With

End If


Margaret
 
D

Doug Robbins - Word MVP

If you still have access to Word 2003, you could use that to create a
toolbar in a template that you then saved in the Word Startup Folder. Then
when you are using Word 2007, the buttons on that toolbar will appear under
the Add-ins tab of the Ribbon.

See the following page of fellow MVP Graham Mayor's website:

http://www.gmayor.com/Toolbars_in_word_2007.htm

Customizing the Ribbon however is not that difficult. See the following
page of Greg Maxey's website:

http://gregmaxey.mvps.org/Customize_Ribbon.htm

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
 
M

Margaret Upton

Hi Doug

Thanks for all the info. I actually put my old normal.dot into the new
version of Word, so I have all old menus available on the add in part,
although of course they do not display as well as they did in the old
version. I just want to learn how to do a version in Word 2007 if it was
possible. I hate something to beat me, but I am not a programmer and really
find customizing the ribbon with macros difficult. Will have another try.
Thank you again.

Margaret
 
G

Graham Mayor

If you put normal.dot in the UserTemplates folder (when there is no
normal.dotm template present there) Word will use normal.dot as the basis
for a new normal.dotm template. Word 2007 does not use the Word 2003 toolbar
and menu system, so inevitably there will be differences when tools are
displayed on the add-ins tab of Word 2007. As Doug has indicated it is
possible to edit the ribbon to create your own tabs or to edit those that
exist to your requirements. It will however require you to learn some xml
programming (unless you employ one of the third party ribbon editors such as
http://ribboncustomizer.com/ ) An editor similar to this will be included in
Word 2010.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
M

Margaret Upton

Graham, thank you for all the information, much appreciated. Taking on
board what you have said, perhaps you can answer a question on this. As I
said, I have put my old Normal.dot into the location, but it still creates
another normal.dot. In the old version it would only tolerate one
normal.dot. I delete the smaller normal.dot (as that is the new one created
by its size), then I notice after a while there is another one there. I
then don't know where things are being stored, in the original one or the
new one. I am very careful to back up my normal dot because of all the auto
text and macros. Can you explain why this happens and what is getting
stored in it. I have Word 2003 still on my system, but I am not using it
and forcing myself to get used to this new version. Thanks again.

Margaret
 
G

Graham Mayor

The normal template for Word 2007 is normal.dotM. If you don't display
filename extensions in Windows you may not see the difference. Normal.dotM
is a compressed file so will be smaller than normal.dot.

Normal.dot is for earlier word versions. It may only be used with Word 2007
as an add-in (for which purpose it is better renamed) though if there is no
normal.dotM in the user templates folder and you put an earlier normal.dot
in that folder, as I suggested, Word 2007 should use the settings in that
normal.dot to create a new normal.dotM template.

It appears that you are removing the required normal.dotm, and Word is
creating a new one to replace it. When it has done so - keep that one and
remove your normal.dot from the user templates folder to an alternative
location.

If you are using both Word 2003 and 2007 on the same PC, create separate
user templates folders for each to avoid hopeless confusion.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
M

Margaret Upton

Thank you as always, that explains it.

Margaret

Graham Mayor said:
The normal template for Word 2007 is normal.dotM. If you don't display
filename extensions in Windows you may not see the difference. Normal.dotM
is a compressed file so will be smaller than normal.dot.

Normal.dot is for earlier word versions. It may only be used with Word
2007 as an add-in (for which purpose it is better renamed) though if there
is no normal.dotM in the user templates folder and you put an earlier
normal.dot in that folder, as I suggested, Word 2007 should use the
settings in that normal.dot to create a new normal.dotM template.

It appears that you are removing the required normal.dotm, and Word is
creating a new one to replace it. When it has done so - keep that one and
remove your normal.dot from the user templates folder to an alternative
location.

If you are using both Word 2003 and 2007 on the same PC, create separate
user templates folders for each to avoid hopeless confusion.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

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