Saving a document

P

Patrick C. Simonds

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
 
D

Doug Robbins - Word MVP

With ActiveDocument
.SaveAs "C:\temp\" & .FormFields("Text1").Result & " - Eligibility
Data.doc"
End With

--
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
 
P

Patrick C. Simonds

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)


Doug Robbins - Word MVP said:
With ActiveDocument
.SaveAs "C:\temp\" & .FormFields("Text1").Result & " - Eligibility
Data.doc"
End With

--
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






---
avast! Antivirus: Inbound message clean.
Virus Database (VPS): 000756-1, 07/13/2007
Tested on: 7/13/2007 2:35:13 PM
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
 
D

Doug Robbins - Word MVP

See response to your other post.

--
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
 
Top