Click here to Skip to main content
15,883,901 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
private void SaveAs(string strFileName, Microsoft.Office.Interop.Word.Document d)
        {
            object missing = System.Reflection.Missing.Value;
            object fileName = strFileName;

            d.SaveAs(ref fileName, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing);
        }


Error:

No overload for method 'SaveAs' takes '11' arguments

Can you help me fix my code. thanks!

-dabeeyow
Posted

1 solution

The error clearly says that there is no "SaveAs" method that take 11 arguments.
Check your method once. How many arguments it will take?
 
Share this answer
 
v2
Comments
dabeeyow 18-May-12 1:57am    
11 arguments sir. I'm using .net 3.5. Is there any alternative code? Thanks!
Pandvi 18-May-12 2:13am    
Seeing you codes, I am not sure what do you want. any update? or just wish to use word.SaveAs() method?
dabeeyow 18-May-12 2:15am    
yes sir actually that's what i want to do. any alternative code? thanks!
Pandvi 18-May-12 2:21am    
SaveAs() is a method defined in C#.NET; you can just call it without override. Check my codes:
doc.SaveAs(ref fileName,
ref missing, ref missing, ref missing, ref missing, ref missing,
ref missing, ref missing, ref missing, ref missing, ref missing,
ref missing, ref missing, ref missing, ref missing, ref missing);
If you wish to learn more about it, move your mouse to SaveAs then right-click, "go to definition"
dabeeyow 18-May-12 2:30am    
but i'm saving with method.

my method was SaveAs as you can see in my code.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900