You're adding a number to a string where you should be concatenating -- the
result is thus not a string, which is the required argument type. Try
ActiveDocument.SaveAs FileName:="My File" & format$(Now, "dd mm yy hh mm
ss")
>I have the following code:
>
[quoted text clipped - 10 lines]
>
> Thanks.
red6000 - 17 Apr 2005 10:28 GMT
> You're adding a number to a string where you should be concatenating --
> the result is thus not a string, which is the required argument type. Try
>
> ActiveDocument.SaveAs FileName:="My File" & format$(Now, "dd mm yy hh mm
> ss")
Thanks, but if I use that I now get;
Compile error:
Type-declaration character does not match declared data type.
Howard Kaikow - 17 Apr 2005 18:02 GMT
> You're adding a number to a string where you should be concatenating -- the
> result is thus not a string, which is the required argument type. Try
>
> ActiveDocument.SaveAs FileName:="My File" & format$(Now, "dd mm yy hh mm
> ss")
Although the OP should be using an & instead of a +, that's not the problem
here.
The statement presented works properly in Word 2003 with either the + or the
&.
Some other statement is causing the problem.