I am advised that I can 'open' a document invisibly in order to retrieve a
certain bookmarks content by assigning the document to an object.
Dim odoc As Object
Set oDoc = GetObject("filename")
(text)= odoc.Bookmarks("bkname").Range
It all works, but for some reason it routinely takes about 15 to 20
(interminable) seconds for the odoc object to be created. Am I doing something
wrong?
Ed
Helmut Weber - 27 Dec 2004 02:33 GMT
Hi,
if you are talking about Word-VBA,
this is the way you would do it:
Dim dTmp As Document
Set dTmp = Documents.Open("c:\test\test-002.doc", Visible:=False)
MsgBox dTmp.Bookmarks("Mark1").Range.Text
dTmp.Close
Set dTmp = Nothing
Greetings from Bavaria, Germany
Helmut Weber, MVP
"red.sys" & chr(64) & "t-online.de"
Word XP, Win 98
http://word.mvps.org/
PathSmart - 27 Dec 2004 15:31 GMT
Thanks!
Does 'visible' work in Word97 and Word2000?
Helmut Weber - 27 Dec 2004 19:58 GMT
Hi,
I bet they do. But can't check it.
Helmut Weber
Tom Winter - 28 Dec 2004 16:19 GMT
I can verify that Word 97 does NOT have the .Visible parameter for
Documents.Add and Documents.Open. Word 2000 does.
Tom Winter
tom@nospam.amosfivesix.com
============
> Thanks!
>
> Does 'visible' work in Word97 and Word2000?