vba Save As no longer works on 50% of workstations.

R

Richard Lawson

I wrote this vba Word macro which parses large muti-letter files into
separate form letter files. This code has been working for a year with
Windows XP, SP2, and Office 2003, SP2. Now 50% of the workstations no longer
work and it seems to be something with this save as function:

ActiveDocument.SaveAs FileName:=DocName, FileFormat:=wdFormatDocument

Rich
 
J

Jean-Guy Marcil

Richard Lawson was telling us:
Richard Lawson nous racontait que :
I wrote this vba Word macro which parses large muti-letter files into
separate form letter files. This code has been working for a year with
Windows XP, SP2, and Office 2003, SP2. Now 50% of the workstations no
longer work and it seems to be something with this save as function:

ActiveDocument.SaveAs FileName:=DocName, FileFormat:=wdFormatDocument

Rich

Have you checked if the IT dept has implemented new security policies (or
modified group/user rights) that affect only those 50%?

--

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 
M

Malcolm Smith

*From:* "Richard Lawson" <[email protected]>
*Date:* Tue, 9 Jan 2007 15:36:52 -0700

I wrote this vba Word macro which parses large muti-letter files into
separate form letter files. This code has been working for a year with
Windows XP, SP2, and Office 2003, SP2. Now 50% of the workstations no
longer work and it seems to be something with this save as function:

ActiveDocument.SaveAs FileName:=DocName, FileFormat:=wdFormatDocument

Rich


What is the value of 'DocName' when it fails? Is it a valid file name?
Does it point to a valid drive?

- Malc
 
R

Richard Lawson

Yeah. That was so obvious that I never even checked. The code has been
running for a year with no issues. But, you are absolutely write, there is a
bug in the path creation that only happens on certain machines.

Thanks,

Rich
 

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