New File Dialog in Word 2007

J

Jean D

I have a little macro that opens the new file dialog in Word 2007 and
changes its default view:

Sub CustomFileNew()
Set vdialog = Dialogs(wdDialogFileNew)
vdialog.Update
SendKeys "%2"
Button = vdialog.Show
If Button <> 0 Then
vTemp = vdialog.Template
Documents.Add Template:=vTemp
End If
End Sub

It works fine, however, it brings up the dialog which shows all of Word's
template tabs as well as our own. I'd like to bring up the dialog that
appears when you click the Office button, New, My Templates that shows only
our custom tabs. Can anyone tell me how to modify this code to do that?

Thanks!
 
C

Cindy M.

Hi Jean,
I'd like to bring up the dialog that
appears when you click the Office button, New, My Templates that shows only
our custom tabs. Can anyone tell me how to modify this code to do that?
You can use

Dialogs(wdDialogFileNew).Show

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 
J

Jean D

Dialogs(wdDialogFileNew).Show

Thank you Cindy, but that still brings up all of Word's categories (Faxes,
Letters, Other Documents, etc.) with its templates. Is there a way to
bring up only our custom directories? In Pro, you click on Office button,
New, My Templates and get the view which I would like to achieve.

Thanks so much for your reply!
 
J

Jean D

Actually, I thought about this some more and decided to do it with
SendKeys:

SendKeys "%"
SendKeys "F"
SendKeys "N"
SendKeys "{Tab}{Tab}{Tab}"
SendKeys "{Down}{Down}"
SendKeys "{Enter}"

Now I can give the users a button on their QAT that runs this macro and
gets them directly to our custom templates only.

Thanks again.
 
F

Frances New

Jean D, you are my hero!!!!! This is EXACTLY what I wanted to accomplish. You are amazing!!!



Jean D wrote:

Actually, I thought about this some more and decided to do it
27-May-08

Actually, I thought about this some more and decided to do it with
SendKeys:

SendKeys "%"
SendKeys "F"
SendKeys "N"
SendKeys "{Tab}{Tab}{Tab}"
SendKeys "{Down}{Down}"
SendKeys "{Enter}"

Now I can give the users a button on their QAT that runs this macro and
gets them directly to our custom templates only.

Thanks again.

Previous Posts In This Thread:

New File Dialog in Word 2007
I have a little macro that opens the new file dialog in Word 2007 and
changes its default view:

Sub CustomFileNew()
Set vdialog = Dialogs(wdDialogFileNew)
vdialog.Update
SendKeys "%2"
Button = vdialog.Show
If Button <> 0 Then
vTemp = vdialog.Template
Documents.Add Template:=vTemp
End If
End Sub

It works fine, however, it brings up the dialog which shows all of Word's
template tabs as well as our own. I'd like to bring up the dialog that
appears when you click the Office button, New, My Templates that shows only
our custom tabs. Can anyone tell me how to modify this code to do that?

Thanks!

Hi Jean,You can useDialogs(wdDialogFileNew).
Hi Jean,

You can use

Dialogs(wdDialogFileNew).Show

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)

Re: New File Dialog in Word 2007
On Sun, 25 May 2008 10:29:47 +0200, Cindy M. wrote:


Thank you Cindy, but that still brings up all of Word's categories (Faxes,
Letters, Other Documents, etc.) with its templates. Is there a way to
bring up only our custom directories? In Pro, you click on Office button,
New, My Templates and get the view which I would like to achieve.

Thanks so much for your reply!

Actually, I thought about this some more and decided to do it
Actually, I thought about this some more and decided to do it with
SendKeys:

SendKeys "%"
SendKeys "F"
SendKeys "N"
SendKeys "{Tab}{Tab}{Tab}"
SendKeys "{Down}{Down}"
SendKeys "{Enter}"

Now I can give the users a button on their QAT that runs this macro and
gets them directly to our custom templates only.

Thanks again.


Submitted via EggHeadCafe - Software Developer Portal of Choice
XmlDocument Caching / SQL Server nText
http://www.eggheadcafe.com/tutorial...b9-a82e85f2a08c/xmldocument-caching--sql.aspx
 

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