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 / February 2004

Tip: Looking for answers? Try searching our database.

SaveCopyAs

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Lee - 24 Feb 2004 23:51 GMT
I am trying to save a copy of a document on closing.  The
original document has already been saved but I want to
save a copy as filtered html to another location for
intranet purposes.  The code I have is:

Private Sub Document_Close()

Dim Save2Intranet As Boolean

Save2Intranet = MsgBox("You are about to close. Do you
wish to save a copy to the intranet?", vbYesNo) = vbYes
If Save2Intranet Then
   .SaveAs "C:\apps\news\newsreleases\" & strTitle,
wdFormatFilteredHTML
End If

End Sub

but this doesn't work.... Help!
Peter Hewett - 25 Feb 2004 00:08 GMT
Hi Lee

Try this instead:

Private Sub Document_Close()

   If MsgBox("You are about to close. Do you wish to " & _
     "save a copy to the intranet?", vbYesNo) = vbYes Then
       ActiveDocument.SaveAs "C:\apps\news\newsreleases\" & _
         ActiveDocument.Name, wdFormatFilteredHTML
   End If

End Sub

HTH + Cheers - Peter

"Lee" <anonymous@discussions.microsoft.com> wrote in news:0deb01c3fb31
$2ec57e50$a001280a@phx.gbl:

> I am trying to save a copy of a document on closing.  The
> original document has already been saved but I want to
[quoted text clipped - 15 lines]
>
> but this doesn't work.... Help!
Lee - 29 Feb 2004 22:18 GMT
Thanks Peter... This works... I've been racking my brain
over this one... Cheers

>-----Original Message-----
>Hi Lee
[quoted text clipped - 37 lines]
>
>.
 
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.