Posted by office viewer on April 29th, 2007
The client needs Microsoft Office installed. If you want to view the Microsoft Word document, you need Microsoft Word installed in your cient.
If you are doing the web application with the EDraw office Viewer Component, you can choose the any type server such as Linux, Unix or Windows.
- Support Office 2000/XP/2003/2007
- Support Windows 2000/XP/2003/Vista
Note: Please test our product before you buy our product firstly.
Posted by office viewer on April 27th, 2007
How to add EDraw Office Viewer Component to your Access Form
1. Open Access
2. Create a new blank database
3. Create a new form in Design View. You should now be in design mode
4. From the Insert Menu select “ActiveX Control…”
5. Select WordViewer.WordView and click the OK Button
6. The control should appear on the form
7. Resize and move the control on the form as desired
8. Add a button to the form. If the wizard appears cancel it
9. Right-click on the button to invoke the popup menu
10. Select “Build Event…” then select Code Builder and click OK Button
11. You should be inside the Visual Basic Development Environment
12. Within the Command_Click enter the following code:
‘Note: Modify code to point to an existing Word Document file on your web server
EDrawOfficeViewer1.Open “http://www.ocxt.com/demo/sample.doc”
13. Save your changes and close Visual Basic
14. Save the form and close it
15. Double-click on the form to run it.
16. Click the button. The Word Document should appear!
17. Experiment by changing the file path to a local file such as:
EDrawOfficeViewer1.Open “c:\test.xls”
Posted by office viewer on April 26th, 2007
EDraw Office Viewer Component can be integrated in the Visual Basic 6.0 project. It will help the developers to open office document in a form with the customize size. You can call the open method to open the word, excel, powerpoint, visio, project document from the local disk or a remote server.
1. From the Project Menu select Components…
2. Select control “EDraw Office Viewer Component” in the controls table
3. Click the OK Button
4. The control will now appear in your toolbox
5. Drag and drop the control on your form
Then you can call its methods and properties. You can also active the event in the component.
Posted by office viewer on April 24th, 2007
How to add EDraw Office Viewer Component to your .NET project
1. Open .NET
2. Right-click on the toolbox and select “Choose Items…”
3. Select the COM Components Tab
4. Check EDraw Office Viewer Component and click OK Button
5. The control should appear in the toolbox as “EDraw Office Viewer Component”
6. Double-click on the control to add to your form
7. Resize and move the control on the form as desired
8. Add a button to the form
9. Double-click on the button to access code editor and enter the following code within the Click event:
‘Note: Modify code to point to an existing office document file on your web server
EDrawOfficeViewer1.Open “http://www.ocxt.com/demo/sample.doc”
10. Change the anchor property of EDrawOfficeViewer1 to Top, Bottom, Left, Right
11. Run the application and click on the button. The Word Document should appear!
The EDraw Office Viewer Componet allows the developers to view office files (Microsoft Word, Excel, PowerPoint, Visio, Project) in .NET project.
Posted by office viewer on April 17th, 2007
It’s important to solve the boundary errors when uploading a file to a server via HTTP. Now EDraw Office Viewer Component has changed the upload method and added a boundary process for the uploaded file and parameter.
The boundary error could be exploited by remote attackers to cause a denial. EDraw suggests all the user updated to the latest version if they are developping a web application with the office viewer ocx but they have the vulnerable server.
Posted by office viewer on April 16th, 2007
Q: Can I use the AxOfficeViewer1.WordInsertPicture in web application.I want to insert a picture from the server dynamically to the opened word document(using openfromstream). Please let me know how do I achieve this.
A: The method AxOfficeViewer1.WordInsertPicture can insert an image from the local disk. You can’t insert an image from the remote server. So you need to download the image from remote server then insert it again. You can use the HttpDownloadFileToTempDir method in the EDraw Office Viewer Component to download the picture file.
Posted by office viewer on April 15th, 2007
If your control will be used on web pages, it is very convenient to distribute it as a .cab (cabinet file)This is a compressed archive - the classic use is to put the .cab file on a web server, and refer to it from web pages that host the control. Internet Explorer is smart enough to download and install the control if it is not already installed on the client machine, and to selectively update any files that are newer in the .cab file. Microsoft provides Makecab.exe for creating and editing .cab files.
In the install directory you can find the CAB file. We have created it for you. But if you want to create a new CAB file with the Office Viewer Component, you can download the CabArc.Exe from Microsoft official site.
Posted by office viewer on April 13th, 2007
With the EDraw office Viewer Component, you can do the office automation in a customize form or web page. It provides the “GetActiveDocument” method to return the document’s dispath interface.
The follow example written with Visual C++ 6.0 demo how to insert an image into the opened microsoft word document.
void COfficeViewerDlg::OnWordautomation()
{
CString strFilter = L”Microsoft Word Document|*.doc;*.docx;*.dot;*.rft|All Files (*.*)|*.*||”;
CFileDialog dlg(TRUE, NULL, NULL, OFN_FILEMUSTEXIST|OFN_HIDEREADONLY, strFilter);
dlg.m_ofn.nFilterIndex = 1;
if (dlg.DoModal() == IDOK)
{
CString pathname = dlg.GetPathName();
VARIANT varPath;
varPath.vt = VT_BSTR; varPath.bstrVal = pathname.AllocSysString();
VARIANT varOpt;
varOpt.vt = VT_ERROR; varOpt.scode = DISP_E_PARAMNOTFOUND;
if(m_oEdrawOfficeViewer.Open(varPath, varOpt)==FALSE){
AfxMessageBox(L”Failed to open the document!”);
return;
}
LPDISPATCH lpDisp;
lpDisp = m_oEdrawOfficeViewer.GetActiveDocument();
//Add text to the first line of the document
_Document m_WordDoc;
//set _Document doc to use lpDisp, the IDispatch* of the actual document.
m_WordDoc.AttachDispatch(lpDisp);
Shape m_wordShape;
Shapes m_wordShapes;
COleVariant vOpt((long)DISP_E_PARAMNOTFOUND, VT_ERROR);
COleVariant vTrue((short)TRUE),vFalse((short)FALSE);
CString m_strPath;
TCHAR exeFullPath[MAX_PATH];
GetModuleFileName(NULL,exeFullPath,MAX_PATH);
m_strPath.Format(L”%s”,exeFullPath);
int ndx = m_strPath.ReverseFind (’\\’);
m_strPath = m_strPath.Left (ndx);
CString filename = m_strPath + L”\\seal.bmp”;
_Application m_WordApp;
m_wordShapes = m_WordDoc.GetShapes();
CString FileName =filename;
m_WordApp=m_WordDoc.GetApplication();
InlineShapes m_WordInlineShapes;
InlineShape m_WordInlineShape;
Selection m_WordSelection;
m_WordSelection=m_WordApp.GetSelection();
m_WordInlineShapes=m_WordSelection.GetInlineShapes();
m_WordInlineShape = m_WordInlineShapes.AddPicture(FileName,vFalse,vTrue,vOpt);
m_wordShape = m_WordInlineShape.ConvertToShape();
Shapes shs;
Shape shp;
shs=m_WordDoc.GetShapes();
VARIANT var;
var.vt=VT_I4;
var.lVal=shs.GetCount();
shp=shs.Item(&var);
shp.Select(&var);
ShapeRange m_wordShapeRange;
WrapFormat m_wordWrapFormant;
m_WordApp = m_WordDoc.GetApplication();
m_wordShape = m_WordSelection.GetShapeRange();
m_wordWrapFormant = m_wordShape.GetWrapFormat();
m_wordWrapFormant.SetType(3);
m_wordShapeRange.ZOrder(4);
PictureFormat m_wordPictureFormat = m_wordShape.GetPictureFormat();
m_wordPictureFormat.SetTransparentBackground(TRUE);
m_wordPictureFormat.SetTransparencyColor(0xFFFFFF);
FillFormat m_wordFillFormat = m_wordShape.GetFill();
m_wordFillFormat.SetVisible(FALSE);
shs.ReleaseDispatch();
shp.ReleaseDispatch();
m_wordPictureFormat.ReleaseDispatch();
m_wordFillFormat.ReleaseDispatch();
m_wordWrapFormant.ReleaseDispatch();
m_wordShapeRange.ReleaseDispatch();
m_wordShape.ReleaseDispatch();
m_wordShapes.ReleaseDispatch();
m_WordSelection.ReleaseDispatch();
m_WordDoc.ReleaseDispatch();
m_WordApp.ReleaseDispatch();
}
}
Posted by tjax on April 3rd, 2007
Running Word 2003 sp3. Word displays this error on any save or save as. It doesn’t matter if the save was issued via the OCX, automation, or in a macro. But word can save the save file to the same place when it is run on the desktop. I have checked all the forum/web solutions. The filename is 8.3. It is not a network drive or share. It is not a novel network. Norton is not installed. It is not a removable device. How can I get over this problem?
Posted by office viewer on April 3rd, 2007
An ActiveX control is an application that can run inside Internet Explorer. When an ActiveX control is signed, it indicates that the control was produced by the signer and has not been altered. EDraw Office Viewer Component is signed by EDrawSoft, and you will not be prompted to install an unsigned control or a control signed by anyone else while using EDraw Component.
By default, Internet Explorer allows signed ActiveX controls to run and you should be prompted to install the EDraw signed ActiveX control. If you have changed your Internet Explorer Security Settings, take the follow steps to ensure that you are able to install the EDraw Office Viewer ActiveX Control:
- Select Tools, then Internet Options from the menu at the top of the Internet Explorer window. The Internet Options section will appear.
- Select Security from the list of tabs at the top of the Internet Options window. The Security section will appear.
- Select the Custom Level button. The Security Settings window will appear.
- Scroll down to the Download signed ActiveX controls entry and select the prompt radio button.
- Scroll down to the Run ActiveX controls and plugins entry and select the enabled radio button.
- Select the OK button to accept the changes.
- You will now be prompted to accept signed ActiveX controls from websites that you visit.
Recent Comments