host word document in IE using Aspx page

We are using the Edraw Office Viewer Component. If we host word document in IE(Internet Explorer) using Aspx page(ASP.NET) what is the communication mode between document and code. Is there a way to receive events from the document.

Is there a way to run ActiveX components in Firefox?

Is there a way to run ActiveX components in Firefox through the use of a plugin?

I seem to have found a solution:

http://code.google.com/p/ff-activex-host/

“This Firefox plugin makes it possible to use ActiveX controls in Firefox. It is based on the Gecko NPAPI and provides full access to the hosted control (events, functions, properties).”

Other ActiveX plug-in that works. It is called neptune. See for more info http://www.meadroid.com/neptune/index.htm

Problem with office viewer component in PowerBuilder

Problem with version 7.1.0.303 in PowerBuilder 12.

I have this code in my application.

lb_DocumentOpened = ole_OfficeViewer.object.Open (“C:\Data\E2FTEMPGB50714\E2FEASSMPLVWGB5071420111018145647897.DOCX”, “Word.Document” )
lole_WordDocument = ole_OfficeViewer.object.ActiveDocument

lb_DocumentOpened is true so from the code it looks like the document is opened, but when I try to get the ActiveDocument it is null. The viewer is blank as well.

There used to be a couple settings in the old version that don’t work anymore such as

This.object.FrameHookPolicy = 1
this.object.ActivationPolicy = Parent.dsoKeepUIActiveOnAppDeactive

I don’t know if this has anything to do with it.

Prints all or part of the specified word document with settings

Edraw Word Viewer Component has the PrintOut method which support to print all or part of the specified document with settings.

boolean PrintOut( WdPrintOutRange PrintRange, [in, optional]
VARIANT FromPage, [in, optional] VARIANT ToPage, [in,
optional] VARIANT Pages, [in, optional] VARIANT Copies);
PrintRange: Optional Object. The page range. Can be any WdPrintOutRange constant.
FromPage: Optional Object. The starting page number when Range is set to wdPrintFromTo.
ToPage: Optional Object. The ending page number when Range is set to wdPrintFromTo.
Pages: Optional Object. The page numbers and page ranges to be printed, separated by
commas. For example, “2, 6-10” prints page 2 and pages 6 through 10.
Copies: Optional Object. The number of copies to be printed.
enum WdPrintOutRange
{
wdPrintAllDocument = 0,
wdPrintSelection = 1,
wdPrintCurrentPage = 2,
wdPrintFromTo = 3,
wdPrintRangeOfPages = 4
};
Example
The following vb script shows how to print the 3-6 page in a document.
Sub PrintOut_Example()
edword.PrintOut 3, 3, 6
End Sub

put header or footer in word viewer component

How to put data into the header or into footer in a word or excel document?

Can we build the windows component in 64 bit

hi,

I have read documentation of Edraw OCX, and I have a question related to print function. Following is help material taken from documentation:

 

Function: HRESULT PrintOut([in, optional] VARIANT PromptUser, [in, optional] VARIANT PrinterName, [in, optional] VARIANT Copies, [in, optional] VARIANT FromPage, [in, optional] VARIANT ToPage, [in, optional] VARIANT OutputFile);Description: Prints current document to specific printer with settings.Parameters:

PromptUser: Indicates whether the user is prompted for the value of the parameter. PrinterName: Indicates the name of printer. Gets an empty string if the default printer is used. 

PrinterName: Indicates the name of printer. Gets an empty string if the default printer is used. Copies: Sets the number of copies of the document to print.

FromPage: Sets the page number of the first page to print.

ToPage: Sets the number of the last page to print.

OutputFile: Sets the name of an optional file to which trace replay output is streamed.

Return Value:

Nonzero if successful; otherwise 0.

Kindly inform me about PromptUser parameter. What is use of this parameter? I have seen VC++ sample Demo. This is an optional parameter. This variable/parameter is not set to any value in this sample. Any related information?

Thanks,

Faizan

Use the CAB file in your web application

The office word component can be used for web application. You can embed it at the
html Object tag.
<object classid=”clsid: 569EB2D6-161D-4AE0-9804-640E724A297A”
id=”edword” width=”100%” height=”100%”
codebase=”http://www.yoursite.com/download/edword.cab#5,0,0,131“>
</object>
Note: You should put the edword.cab file in your own site and change the
codebase url when you distribute the component.
You can view the html samples in the install folder\samples\html folder.
The edword.

Open Excel From File Stream Using .NET

After installed the latest demo version,  you can open the excel from file stream using the following code:

objExcel.HttpInit();

objExcel.HttpAddPostFile(“”,”Evaluation.xlsx”);

objExcel.HttpOpenFileFromStream(“Evaluation/EvaluationReceiver.aspx”);

Before you call function HttpOpenFileFromStream, you should do two things, one is to initialize http for clearing all parameters and cookies in http, another thing is to appoint the file or database record. And then use HttpOpenFileFromStream to send the request to the destinated webpage. Before HttpOpenFileFromStream send request, it will add a couple of parameters automatically.
m_OAHttp.AddPostArgument(L”EDA_GETSTREAMDATA”, L”EDA_YES”); This couple of parameters tell the destinated webpage OfficeViewer will received file as stream.

At the web side, webpage will decide to read which file or database reacord accordding to the post parameters. And you should add boundary flag ‘EDA_STREAMBOUNDARY’ to file data, following is the asp.net demo.

if (Request.Params[“EDA_GETSTREAMDATA”] == “EDA_YES”)
{
  String fullFileName = Server.MapPath(Request.Params[“DocumentID”]);
  Byte[] fs = File.ReadAllBytes(fullFileName);

  Response.Write(“Get Stream Successfully!”);
  Response.Write(“EDA_STREAMBOUNDARY”);
  Response.BinaryWrite(fs);
  Response.Write(“EDA_STREAMBOUNDARY”);
}

How to do the office automation in Delphi

We want to use this component to pilot Word and Visio documents, but we have certain problems and I would like to ask you some questions :

In Word, I use bookmarks to automatically insert data, like date, name of the user. To do this, in my code I use WordGotoItem function :

    OfficeViewer_1.WordGotoItem(wdGoToBookmark, wdGoToFirst, 1, ‘Name’);

but it doesn’t work, and I don’t know why.

Could you give me more information about this function and what’s wrong in my code ?

And I have another question :

How do I reach the header or footer of the word document ? Is there a function ?

 

Edraw Office Viewer Component can work in Delphi 2007/2009 for the office automation.

For example:
 
var
p1,p2: OleVariant;
OleAPP,OleDoc,MenuBar: OleVariant;
begin
  OfficeViewer.Toolbars:=FALSE; 
  OfficeViewer.Titlebar:=FALSE;
  p1:=DocFileName;
  p2:=TRUE;
  OfficeViewer.Open(DocFileName);
  OleDoc:=OfficeViewer.ActiveDocument; // IDispatch Document
  OleAPP:=OleDoc.application; // IDispatch Document.application
  // ——— WORD —————————————
  OleAPP.ActiveWindow.DisplayRulers := False;
  OleAPP.ActiveWindow.View.Type := 1; // wdNormalView=1
  // no popup
  oleDoc.CommandBars[‘Text’].Enabled := False;
  try
   OleDoc.Protect(1,Null,’ppkLock’);
  except
  end;
end;