[AccessD] auto save in word

Stuart McLachlan stuart at lexacorp.com.pg
Mon May 24 20:02:04 CDT 2004


On 24 May 2004 at 21:32, Pedro Janssen wrote:

> Hello Stuart,
> 
> thanks for your help. When a file exists it makes suffixes like _ 1, _ 2
> etc., but these are saved in My Documents (Dir$???). 

Yes, they would be the way I wrote that aircode :-(
Try:
Document.SaveAs FileName:= 
"W:\WerkbrievenOpslag\Bezoekrapport\Bezoekrapport" _ 
   & strFileNamePart & "_" & strSuffix & ".doc"

>Can you give me a hand
> on how to use the doc properties in your code (i placed them in the code,
> but with no result)?
> 
Not sure what you  are asking for here 
> 
> For Each prop In ActiveDocument.CustomDocumentProperties
>         If prop.Name = "BezoekRapportID" Then
>             strFileNamePart = prop.Value
>             Exit For
>         End If
>     Next

This is looking for a custom property called "BezoekRapportID" and 
setting strFileNamePart to the value of that property.  Have you set 
an appropriate Name/Value in the the documents properties under the 
"Custom" tab?

 
-- 
Lexacorp Ltd
http://www.lexacorp.com.pg
Information Technology Consultancy, Software Development,System 
Support.






More information about the AccessD mailing list