(e-mail address removed) was telling us:
(e-mail address removed) nous racontait que :
For some reason this statement is not recognized by VB " oDoc As
Word.Document ".
I am new to creating micros and it might be a silly questions, sorry
but any help will be appreciated.
If
Dim oDoc As Word.Document
is throwing an error, then you are not writing this code from the Word VBA
editor.
Are you writing this with Visual Studio or from another application, like
Excel?
I suspect you re trying to control Word form Excel because you posted two
other messages that had to do with Excel. When you post, you have to provide
details, we cannot guess. The more details you will provide the better the
answer and he quicker your problem will be solved.
So, from the Excel (I guess) VBA editor window, do Tools > References >
check the Microsoft Word Object Library xx (xx depends on the version you re
using, normally there is only one so you cannot go wrong).
You have to do this because Excel does not know Word objects and their
properties/methods, you have to tell him you re going to use Word objects.
You do that with a reference.
--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site:
http://www.word.mvps.org