Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / December 2004

Tip: Looking for answers? Try searching our database.

Open a new doc and save

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
J.J. Kayande - 30 Dec 2004 21:58 GMT
I'm trying to open a new document and bring up the File
Save As dialog to save it.  I'm having problems reliably
activating the new document instead of the original
document I'm starting from.  This is the code I'm using
right now (mostly gleaned from the Microsoft MVP site):

   Dim docMyName As String
   docMyName = "My Name"

   Documents.Add DocumentType:=wdNewBlankDocument
   Windows(1).Activate
   
   With Dialogs(wdDialogFileSaveAs)
       .Name = docMyName
       .Show
   End With

I am running MS Word 2002 on Windows 2000.
J.J. Kayande
Greg Maxey - 30 Dec 2004 22:25 GMT
JJ

Try taking out the 'Windows(1).Activate

Sub Test()
Dim docMyName As String
docMyName = "My Name"

Documents.Add DocumentType:=wdNewBlankDocument
   With Dialogs(wdDialogFileSaveAs)
       .Name = docMyName
       .Show
   End With
End Sub

Signature

Greg Maxey/Word MVP
A Peer in Peer to Peer Support

> I'm trying to open a new document and bring up the File
> Save As dialog to save it.  I'm having problems reliably
[quoted text clipped - 15 lines]
> I am running MS Word 2002 on Windows 2000.
> J.J. Kayande

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.