View Single Post
 
Old 08-29-2014, 03:21 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by kramer74 View Post
How do I know where the new documents are going to be saved, as they've ended up in three different folders as I've been using the macro.
...
I have changed the following code
Code:
StrTxt = ActiveDocument.Path & Application.PathSeparator & .Text & ".docx"
by removing "ActiveDocument.Path & " so that the path isn't included in the filename, so now I get the filename I want.
What you've done is not to exclude the path from the filename, but the part that tells Word where to save the file! That part of the code tells Word to save the output file back to the same folder as the input file.
Quote:
is there a way to remove the first 6 characters from the filename, namely "Abcde ", as this would make it perfect.
You could use:
Code:
StrTxt = ActiveDocument.Path & Application.PathSeparator & Replace(.Text, "Abcde ", "") & ".docx"
Quote:
Using three test files the last page was missed off in all instances.
Try changing:
For i = 1 To .Sections.Count - 1 Step j
to:
For i = 1 To .Sections.Count Step j
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote