SAVEAS vba

  • Thread starter FIRSTROUNDKO via OfficeKB.com
  • Start date
F

FIRSTROUNDKO via OfficeKB.com

Hi!

I have word documents that have the first line

adogisacat
apigisacow

How do I select the 2 to 4 characters and save in c:\animals\

under dog.doc and pig.doc

Thanks in advance
 
D

Doug Robbins - Word MVP

Dim fname As Range
With ActiveDocument
Set fname = .Range
fname.start = fname.start + 1
fname.End = fname.start + 3
.SaveAs "c:\animals\" & fname.Text
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
 

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