Connecting Tech Pros Worldwide Forums | Help | Site Map

saving word documents

ken
Guest
 
Posts: n/a
#1: Nov 13 '05
I get error 13 type mismatch for this piece of code:

With objWord
.Visible = True
.Documents.Open (CurrentProject.Path & "\tmp.doc")
If Len([Name]) > 2 Then[color=blue][color=green][color=darkred]
>>>>> .Documents.Save (CurrentProject.Path & "\" & [Name] &[/color][/color][/color]
".doc")
Else

It opens the word document just fine, passes the if condition and when
it gets to .Documents.Save, I get an error. I even tried to do this:
..Documents.Save ("file.doc"), but it still did not work. Anotherwords
the statement between () is correct.

Any help appreciated.




Arno R
Guest
 
Posts: n/a
#2: Nov 13 '05

re: saving word documents


Will .Documents.SaveAs work ?


--
Hope this helps
Arno R



"ken" <gevayl@gmail.com> schreef in bericht news:1114634136.639437.122190@g14g2000cwa.googlegr oups.com...[color=blue]
>I get error 13 type mismatch for this piece of code:
>
> With objWord
> .Visible = True
> .Documents.Open (CurrentProject.Path & "\tmp.doc")
> If Len([Name]) > 2 Then[color=green][color=darkred]
>>>>>> .Documents.Save (CurrentProject.Path & "\" & [Name] &[/color][/color]
> ".doc")
> Else
>
> It opens the word document just fine, passes the if condition and when
> it gets to .Documents.Save, I get an error. I even tried to do this:
> .Documents.Save ("file.doc"), but it still did not work. Anotherwords
> the statement between () is correct.
>
> Any help appreciated.
>[/color]
ken
Guest
 
Posts: n/a
#3: Nov 13 '05

re: saving word documents


..Documents.SaveAs give me "Method of Datamember not found" error

Arno R
Guest
 
Posts: n/a
#4: Nov 13 '05

re: saving word documents


"ken" <gevayl@gmail.com> schreef in bericht news:1114635400.726299.4290@l41g2000cwc.googlegrou ps.com...[color=blue]
> .Documents.SaveAs give me "Method of Datamember not found" error[/color]

Sorry, try .ActiveDocument.SaveAs

Arno R

ken
Guest
 
Posts: n/a
#5: Nov 13 '05

re: saving word documents


that works

Closed Thread