|
|||
|
Hi,
I am facing a problem with swfkit application. I embedded the swf in swfkit and added a dll created in VB6. The dll updates a word doc already created and prints the document. As soon as the print dialog appears the swfkit application shows "switch to - retry" COM error message. The dll when run independently do not produce any error. I even registered the dll in system and removed from attachment but the error is still present. Please tell me if there is any way to handle this error? Thanks, Nitin |
|
|||
|
It's complicated as your dll calls Microsoft word via OLE. Maybe you can try to convert the VB code into ffish script, as SWFKit can also modify a word doc
Code:
word = new ActiveXObject("word.application");
word.Visible = true;
trace(word.Visible);
word.Documents.Add();
word.Selection.TypeText("This is a test...");
word.Documents[1].SaveAs("c:\\test.doc");
word.Quit();
//Example2 - create an ActivexObjext from file
doc = new ActiveXObject("c:\\test.doc");
doc.SaveAs("c:\\test1.doc");
|
|
|||
|
I tried this but it is not working
MyWord = new ActiveXObject("word.application"); MyWord.Visible = true; WordDoc = MyWord.Documents.Open(getAppDir()+"Periop101_ROI_T ool.doc") WordDoc.Application.Dialogs(wdDialogFilePrint).Sho w The word application opens but Print Dialog box do not show up. ![]() |
|
|||
|
You must first define the wdDialogFilePrint contant
![]() Code:
ActiveXObject.dontBeBusy();
wdDialogFilePrint = 88;
MyWord = new ActiveXObject("word.application");
MyWord.Visible = true;
WordDoc = MyWord.Documents.Open(getAppDir()+"Periop101_ROI_T ool.doc")
WordDoc.Application.Dialogs(wdDialogFilePrint).Show();
|
![]() |
Was this information helpful? Yes No
| Thread Tools | |
| Display Modes | |
|
|