Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / December 2004

Tip: Looking for answers? Try searching our database.

GetObject

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Let2Editor - 27 Dec 2004 00:10 GMT
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?

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.