Click here to Skip to main content
15,920,896 members
Home / Discussions / COM
   

COM

 
GeneralRe: How can I filter unwanted unwanted types(not in my code) from DIA SDK? Pin
glitteringsound13-Nov-10 9:51
glitteringsound13-Nov-10 9:51 
GeneralRe: How can I filter unwanted unwanted types(not in my code) from DIA SDK? Pin
Richard MacCutchan14-Nov-10 1:45
mveRichard MacCutchan14-Nov-10 1:45 
GeneralRe: How can I filter unwanted unwanted types(not in my code) from DIA SDK? Pin
glitteringsound14-Nov-10 3:52
glitteringsound14-Nov-10 3:52 
GeneralRe: How can I filter unwanted unwanted types(not in my code) from DIA SDK? Pin
Richard MacCutchan14-Nov-10 4:23
mveRichard MacCutchan14-Nov-10 4:23 
QuestionCan we calculate/extract Virtual Table address some how from DIA SDK? Pin
glitteringsound4-Nov-10 12:30
glitteringsound4-Nov-10 12:30 
AnswerRe: Can we calculate/extract Virtual Table address some how from DIA SDK? Pin
Richard MacCutchan4-Nov-10 23:34
mveRichard MacCutchan4-Nov-10 23:34 
GeneralRe: Can we calculate/extract Virtual Table address some how from DIA SDK? Pin
glitteringsound5-Nov-10 0:12
glitteringsound5-Nov-10 0:12 
GeneralRe: Can we calculate/extract Virtual Table address some how from DIA SDK? Pin
Richard MacCutchan5-Nov-10 1:52
mveRichard MacCutchan5-Nov-10 1:52 
GeneralRe: Can we calculate/extract Virtual Table address some how from DIA SDK? Pin
glitteringsound5-Nov-10 2:10
glitteringsound5-Nov-10 2:10 
GeneralRe: Can we calculate/extract Virtual Table address some how from DIA SDK? Pin
Richard MacCutchan5-Nov-10 2:27
mveRichard MacCutchan5-Nov-10 2:27 
QuestionQuering a COM object in .net Pin
cable beach19-Oct-10 20:03
cable beach19-Oct-10 20:03 
AnswerRe: Quering a COM object in .net Pin
«_Superman_»19-Oct-10 21:42
professional«_Superman_»19-Oct-10 21:42 
GeneralRe: Quering a COM object in .net Pin
cable beach20-Oct-10 13:26
cable beach20-Oct-10 13:26 
GeneralRe: Quering a COM object in .net Pin
Lim Bio Liong24-Oct-10 20:40
Lim Bio Liong24-Oct-10 20:40 
GeneralRe: Quering a COM object in .net Pin
cable beach25-Oct-10 13:17
cable beach25-Oct-10 13:17 
QuestionShell Extension Pin
A_Fa15-Oct-10 18:47
A_Fa15-Oct-10 18:47 
QuestionIHTMLElement2 functions crash in IE7 when scrolling browser control programmatically Pin
castielle_alana15-Oct-10 1:38
castielle_alana15-Oct-10 1:38 
AnswerRe: IHTMLDocument2 functions crash in IE7 when scrolling browser control programmatically Pin
castielle_alana15-Oct-10 1:44
castielle_alana15-Oct-10 1:44 
QuestionCoInitialize return code Pin
alex__b14-Oct-10 23:30
professionalalex__b14-Oct-10 23:30 
AnswerRe: CoInitialize return code [modified] Pin
Sauro Viti14-Oct-10 23:46
professionalSauro Viti14-Oct-10 23:46 
GeneralRe: CoInitialize return code Pin
alex__b15-Oct-10 0:05
professionalalex__b15-Oct-10 0:05 
QuestionInvoke methods in OCX in c# Pin
Viratsaran11-Oct-10 20:18
Viratsaran11-Oct-10 20:18 
AnswerRe: Invoke methods in OCX in c# Pin
«_Superman_»13-Oct-10 20:31
professional«_Superman_»13-Oct-10 20:31 
QuestionConvert document to PDF format Pin
hemananthan15-Sep-10 19:29
hemananthan15-Sep-10 19:29 
Can anybody help me programatically using COM components to get the solution for converting any type of document to PDF format
we already tried through this coding:

public static void ConverWordToPDF(string Filepath, string Targetpath)
{

object Unknown = Type.Missing;
object Source = Filepath;
object Target = Targetpath;

ApplicationClass MSdoc = new ApplicationClass();

try
{

MSdoc.Visible = false;
MSdoc.Documents.Open(ref Source, ref Unknown,
ref Unknown, ref Unknown, ref Unknown,
ref Unknown, ref Unknown, ref Unknown,
ref Unknown, ref Unknown, ref Unknown,
ref Unknown, ref Unknown, ref Unknown, ref Unknown, ref Unknown);
MSdoc.Application.Visible = false;
MSdoc.WindowState = Microsoft.Office.Interop.Word.WdWindowState.wdWindowStateMinimize;

object format = Microsoft.Office.Interop.Word.WdSaveFormat.wdFormatPDF;

MSdoc.ActiveDocument.SaveAs(ref Target, ref format,
ref Unknown, ref Unknown, ref Unknown,
ref Unknown, ref Unknown, ref Unknown,
ref Unknown, ref Unknown, ref Unknown,
ref Unknown, ref Unknown, ref Unknown,
ref Unknown, ref Unknown);
}
catch (Exception e)
{
log.Info("Converted Word to PDF", e);

}
finally
{
if (MSdoc != null)
{
MSdoc.Documents.Close(ref Unknown, ref Unknown, ref Unknown);

}

MSdoc.Quit(ref Unknown, ref Unknown, ref Unknown);
}
}
Normally in while runing this application in local its working fine in XP System:
while run through IIS i getting the following error:
System.Runtime.InteropServices.COMException (0x800A11FD):
===================
System.Runtime.InteropServices.COMException (0x800A11FD):
This method or property is not available because a document window is not active.

at Microsoft.Office.Interop.Word.Documents.Close(Object& SaveChanges,
Object& OriginalFormat, Object& RouteDocument)
Can anybody suggest me how to resolve it or any new solution for conversion process
Thanks

Regards
Hemananthan>S

AnswerRe: Convert document to PDF format Pin
Member 45243333-Jul-11 22:40
Member 45243333-Jul-11 22:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.