Click here to Skip to main content
15,895,799 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have issue Related to Fax Sending

When we send Fax of Pdf file fax send Successfully,
but when we send Fax of Docx files and XLX fles fax Send Successfull but Total Pages Count display 0 after send Fax Receipt Generate on this Receipt Data display like this
for Document Total Pages display 0

Fax Receipt :

Fax Number  - 12345  
Request ID  - 370  
Total Pages - 0  
Send Date  - 05/09/2012 13:30:32  
Recipient/Address To  - Test  
Document  - Agency Profile_Fax_20120509013014.docx  
Sequence Number  - 567  
Sender  - Dummy User  
Comment  - Test 


I am using below given code for Total Page but not workin

C#
if (fileType.ToUpper() == "DOCX" || fileType.ToUpper() == "DOC")
{
   int totalnumOfPages = 0;
   object fileName = FileName;
   object readOnly = false;
   object isVisible = true;
   object objDNS = Word.WdSaveOptions.wdDoNotSaveChanges;

	Word.ApplicationClass WordApp = new Word.ApplicationClass();
	object missing = System.Reflection.Missing.Value;
    Word.Document aDoc = WordApp.Documents.Open(ref Filepath, ref missing, ref readOnly, ref missing, ref missing, ref missing,ref missing,
    ref missing, ref missing, ref missing, ref missing, ref isVisible, ref missing, ref missing, ref missing, ref missing);

	Word.WdStatistic stat = Word.WdStatistic.wdStatisticPages;
    totalnumOfPages = aDoc.ComputeStatistics(stat, ref missing);
	WordApp.Quit(ref objDNS, ref missing, ref missing);
	aDoc = null;
    WordApp = null;
    GC.Collect();
}
Posted
Updated 8-May-12 22:45pm
v2
Comments
Peter_in_2780 9-May-12 4:18am    
I have deleted you previous partial question. Others can help you with this one.
Sandeep Mewara 9-May-12 4:46am    
'Not working' as in? Any error? Execution does not happen? What exactly?

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