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 / July 2007

Tip: Looking for answers? Try searching our database.

Saving a document

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Patrick C. Simonds - 13 Jul 2007 06:19 GMT
I need some code which will allow me to save the active document  to
C:\Temp, and the name of the document will be made up the contents of
TextBox1 (which contains a last name) and then some standard naming.
Something like this:

C:\Temp|Miller, Eligibility Data.doc

---
avast! Antivirus: Outbound message clean.
Virus Database (VPS): 000756-0, 07/12/2007
Tested on: 7/12/2007 10:20:00 PM
avast! - copyright (c) 1988-2007 ALWIL Software.
http://www.avast.com
Doug Robbins - Word MVP - 13 Jul 2007 09:54 GMT
With ActiveDocument
   .SaveAs "C:\temp\" & .FormFields("Text1").Result & " - Eligibility
Data.doc"
End With

Signature

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

>I need some code which will allow me to save the active document  to
>C:\Temp, and the name of the document will be made up the contents of
[quoted text clipped - 9 lines]
> avast! - copyright (c) 1988-2007 ALWIL Software.
> http://www.avast.com
Patrick C. Simonds - 14 Jul 2007 18:58 GMT
Sorry it took a while to get back to this, but, I get an error  "The
requested member of the collection does not exist"

Just to be clear, the information I want to add to the document name, is
located in TextBox1 of UserForm8 (the UserForm is open when this code is
run) so it would look like this:

C:\Temp|XXXX, Eligibility Data.doc (where XXXX is the content of TextBox1 of
UserForm8)

> With ActiveDocument
>    .SaveAs "C:\temp\" & .FormFields("Text1").Result & " - Eligibility
[quoted text clipped - 21 lines]
> avast! - copyright (c) 1988-2007 ALWIL Software.
> http://www.avast.com

---
avast! Antivirus: Outbound message clean.
Virus Database (VPS): 000756-1, 07/13/2007
Tested on: 7/14/2007 10:58:45 AM
avast! - copyright (c) 1988-2007 ALWIL Software.
http://www.avast.com
Doug Robbins - Word MVP - 14 Jul 2007 23:19 GMT
See response to your other post.

Signature

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

> Sorry it took a while to get back to this, but, I get an error  "The
> requested member of the collection does not exist"
[quoted text clipped - 38 lines]
> avast! - copyright (c) 1988-2007 ALWIL Software.
> http://www.avast.com
 
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.