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 2006

Tip: Looking for answers? Try searching our database.

Prevent Word templates in STARTUP folder from loading (Acc97/Wrd97)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
asdfasdfnl@yahoo.com - 31 Dec 2006 16:36 GMT
For a client I have an Acc97 application creating a Word97-document.
In that document a number of BookMarks are "exchanged" with info from
the database.
Also some "replace" actions are executed in the Word-document (like:
"replace 'sir' 'madam' all)

Every now and then after the document is generated it turns out that
part of the beginning of the document is missing - including bookmarks
and static text.
Once a "corrupt" document is generated it will be corrupt again when it
is generated anew - only a logoff/logon sequence will produce a proper
document again.

Unfortunately it happens only at clients pc.

To check where things might go wrong I have collected the
charactercounts (story.characters.count) of the word document during
the "exchange" of the bookmarks both while a "good" and a "wrong"
document was generated - the charactercounts were the same.
So the changing of the bookmarks with info from the database seems not
to be the culprit.

The other thing that worried me was the number of templates that were
loaded at clients pc.
They are left over from "experts" that worked at clients place during
the years.

As the STARTUP folder is at the moment part of the image that is
default loaded at clients pc (large corporation) it not a matter of
simply deleting all the templates from the StartUp folder.
(Even worse - due to restrictions it is "impossible" to FileExplore the
C-drive!)

Long story short - how do I prevent the loading of templates when
creating a new Word-Document from within Acc97?

I know you can use the "/a" switch as command-line switch thus
preventing templates to be loaded when starting Word from the Explorer
but wouldn't know how to do the same with:
set objWord = New Word.Application.

Any ideas?
Cindy M. - 31 Dec 2006 19:40 GMT
> Long story short - how do I prevent the loading of templates when
> creating a new Word-Document from within Acc97?
[quoted text clipped - 3 lines]
> but wouldn't know how to do the same with:
> set objWord = New Word.Application.

It would be possible to loop the Addins collection of the Word
application and unload any "unwanted" addins from memory before
generating your document. If you want to be really "proper" you'd keep a
list and load them again when your code finishes...

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question
or reply in the newsgroup and not by e-mail :-)

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.