VBA code to pick up nth to (n+x)th character

Joined
Apr 20, 2010
Messages
9
Reaction score
0
Over on another thread (https://www.pcreview.co.uk/forums/thread-892209.php) we've got a problem that I think I can solve with just a little more help. Since the title of the existing thread bears little relation to the question I'm asking, I thought I'd start a new one.

Basically I'd like to to pick up the nth to the (n+x)th characters in a document and have them replace LTrim$(Str$(Counter))in this line of the macro:
Code:
DocName = "Myletter" & LTrim$(Str$(Counter))

Problem is, as someone who has only used VBA in Excel before, I don't know the syntax or how to find out the character number of a particular bit of text. (Well, I can guess the latter, but is a return a single character? or none? or 80?) And Word's own VBA help files & articles - on & offline - are still above my head.

Thanks in advance for any light anyone can shed on this.
 

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