How to avoid accessing template opening docs

M

mustomat

I need to know how to skip the intial reading of template when opening
document from VBA
I have a lot of docs in a network folder referencing to an old templat
in a location that doesn`t exist anymore and when I try to open the
manually it is trying to access the wrong address that doesn`t exist. I
the lower bar it indicates to use ESC to abort accessing template and i
works and the document opens and I know how to remove the wrong templat
manually but the problem is that there are too much docs to do i
manually one by one, so I thought in a VBA macro but I can`t find th
way to avoid the initial access to the template when opening a documen
and the macro never ends and the computer hangs. Anybody knows how t
solve that? Thanks in advance
 
S

Stefan Blom

You may have to add a delay to the code, so that the file opens completely
before the macro runs. Look up the Application.OnTime method in Word VBA Help.

Also, if you posted some example code, I'm sure someone could help.
 
M

mustomat

Thanks, Stefan, but the solution with delay is not enough, because th
delay to open each document could be of more than 10 minutes in som
cases (even worst when address begin with a valid external IP) and ther
are several hundreds of files to scan, so it could be too much to wait.

The code is not very relevant because I'm only trying with a simple Fo
loop with the files results of a previous search and presently I onl
use the open instruction for each file (in the future I thought to put
check of the template address and the removal of bad addresses, but thi
part is not important if I can´t open the files before).

Thanks aganin. Javier

'Stefan Blom[_3_ said:
;492713']You may have to add a delay to the code, so that the file open
completely
before the macro runs. Look up the Application.OnTime method in Word VB
Help.

Also, if you posted some example code, I'm sure someone could help.

--
Stefan Blom
Microsoft Word MVP





"mustomat" (e-mail address removed) wrote in message

I need to know how to skip the intial reading of template when openin
a
document from VBA
I have a lot of docs in a network folder referencing to an ol
template
in a location that doesn`t exist anymore and when I try to open them
manually it is trying to access the wrong address that doesn`t exist
In
the lower bar it indicates to use ESC to abort accessing template an
it
works and the document opens and I know how to remove the wron
template
manually but the problem is that there are too much docs to do it
manually one by one, so I thought in a VBA macro but I can`t find the
way to avoid the initial access to the template when opening
document
and the macro never ends and the computer hangs. Anybody knows how to
solve that? Thanks in advance.
 
S

Stefan Blom

OK, delays for more than ten minutes certainly present a problem. :-( If you
don't get a reply here, try the Word Developer forum at
http://social.msdn.microsoft.com/Forums/en-US/worddev/threads or the Word
TechNet forum at http://social.technet.microsoft.com/Forums/en-US/word/threads.

--
Stefan Blom
Microsoft Word MVP





mustomat said:
Thanks, Stefan, but the solution with delay is not enough, because the
delay to open each document could be of more than 10 minutes in some
cases (even worst when address begin with a valid external IP) and there
are several hundreds of files to scan, so it could be too much to wait.

The code is not very relevant because I'm only trying with a simple For
loop with the files results of a previous search and presently I only
use the open instruction for each file (in the future I thought to put a
check of the template address and the removal of bad addresses, but this
part is not important if I can´t open the files before).

Thanks aganin. Javier

'Stefan Blom[_3_ said:
;492713']You may have to add a delay to the code, so that the file opens
completely
before the macro runs. Look up the Application.OnTime method in Word VBA
Help.

Also, if you posted some example code, I'm sure someone could help.

--
Stefan Blom
Microsoft Word MVP





"mustomat" (e-mail address removed) wrote in message

I need to know how to skip the intial reading of template when opening
a
document from VBA
I have a lot of docs in a network folder referencing to an old
template
in a location that doesn`t exist anymore and when I try to open them
manually it is trying to access the wrong address that doesn`t exist.
In
the lower bar it indicates to use ESC to abort accessing template and
it
works and the document opens and I know how to remove the wrong
template
manually but the problem is that there are too much docs to do it
manually one by one, so I thought in a VBA macro but I can`t find the
way to avoid the initial access to the template when opening a
document
and the macro never ends and the computer hangs. Anybody knows how to
solve that? Thanks in advance.
 

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