Version of word doc was created from

S

Seb

Is it possible to find out what version of word a
document was created in. I need to assign it to a
variable.

Thanks,
Seb
 
J

Jezebel

The document's .SaveFormat property. Doesn't actually tell you the creation
format but the format of the last save.
 
J

Jonathan West

Hi Seb

You can read the dcument properties of a Word document using dsofile.dll.
Among the properties is the Application property which indicates the Word
version. for more details and sample code which uses dsofile.dll, take a
look at this article

Getting access to the Document Properties of a Word file
http://www.mvps.org/word/FAQs/MacrosVBA/DSOFile.htm
 
S

Seb

I've tried this method, the only problem is
that .saveformat does not return a unique value for each
version of word.
 
U

user

I would like to know how to do this so I can stop my macro once it reach
a certain line or paragraph.

When my macro is parseing the document I can't tell the position of the
cursor and thus stop the macro when it reaches the paragraph where it
needs to stops.
 
H

Howard Kaikow

Why do you want that information?

A document may have been created in version x, but may have been modified in
other versions, so there is no one version of creation.
 
W

Word Heretic

G'day (e-mail address removed),

Lets say its a range you have, like selection.range
then simply .range.movestart wdstory,-1 and use
..range.paragraphs.count



(e-mail address removed) was spinning this yarn:
I would like to know how to do this so I can stop my macro once it reach
a certain line or paragraph.

When my macro is parseing the document I can't tell the position of the
cursor and thus stop the macro when it reaches the paragraph where it
needs to stops.

Steve Hudson

Word Heretic, Sydney, Australia
Tricky stuff with Word or words for you.
wordheretic.com

Replies offlist may require payment.
 

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