<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>

<channel>
	<title>Office Viewer Component</title>
	<atom:link href="http://www.ocxt.com/feed" rel="self" type="application/rss+xml" />
	<link>http://www.ocxt.com</link>
	<description>ActiveX document container for hosting Office documents and PDF (including Adobe PDF, Microsoft Word, Microsoft Excel, Microsoft PowerPoint, Microsoft Project and Microsoft Visio documents)</description>
	<pubDate>Thu, 02 Jul 2009 10:27:57 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<item>
		<title>Edraw Office Viewer Component V6.0 Released</title>
		<link>http://www.ocxt.com/archives/92</link>
		<comments>http://www.ocxt.com/archives/92#comments</comments>
		<pubDate>Wed, 03 Jun 2009 15:01:51 +0000</pubDate>
		<dc:creator>office viewer</dc:creator>
		
		<category><![CDATA[Press Release]]></category>

		<guid isPermaLink="false">http://www.ocxt.com/?p=92</guid>
		<description><![CDATA[

Edraw Office Viewer Component Acts as an ActiveX document container for embeding Office documents (including Microsoft Word, Microsoft Excel, Microsoft PowerPoint, Microsoft Project, and Microsoft Visio documents) in a custom form or Web page. The control is lightweight and flexible, and gives developers new possibilities for using Office in a custom solution.
Download link: http://www.ocxt.com/download/OfficeOCXSetup.exe
Online Demo: [...]]]></description>
			<content:encoded><![CDATA[<p><strong></strong></p>
<p><span style="font-family: Verdana; font-size: 16pt;"><a title="Office  Viewer Component" href="http://www.ocxt.com/download/OfficeOCXSetup.exe"><img style="border: 0px;" src="http://www.ocxt.com/images/officecomponent.png" border="0" alt="Office Viewer Component" width="463" height="195" /></a></span></p>
<p>Edraw Office Viewer Component Acts as an ActiveX document container for embeding Office documents (including Microsoft Word, Microsoft Excel, Microsoft PowerPoint, Microsoft Project, and Microsoft Visio documents) in a custom form or Web page. The control is lightweight and flexible, and gives developers new possibilities for using Office in a custom solution.</p>
<p>Download link: <a href="http://www.ocxt.com/download/OfficeOCXSetup.exe">http://www.ocxt.com/download/OfficeOCXSetup.exe</a></p>
<p>Online Demo: <a href="http://www.ocxt.com/online-demo">http://www.ocxt.com/online-demo</a></p>
<p><span style="font-family: Verdana;"><span style="text-decoration: none;"><a title="Download Office OCX" href="http://www.ocxt.com/download/OfficeOCXSetup.exe"><img style="border: 0px;" src="http://www.ocxt.com/images/btn_down.gif" border="0" alt="Free download Office Viewer Component" width="108" height="22" /></a></span><span style="color: #ff0000;"><strong><span style="vertical-align: middle;"> </span></strong></span><span style="text-decoration: none;"><a title="Buy Office Viewer Component" href="https://www.regnow.com/softsell/nph-softsell.cgi?item=14621-2"><img style="border: 0px;" src="http://www.ocxt.com/images/btn_buy.gif" border="0" alt="Purchase Office Viewer Component in a promotional price" width="108" height="22" /></a></span><span style="color: #ff0000;"><strong><span style="vertical-align: middle;"> </span></strong></span></span></p>
<p>You can find the sample projects and help document in the install folder. <a title="Office  Viewer Component" href="http://www.ocxt.com/officeviewer.php">Learn More</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ocxt.com/archives/92/feed</wfw:commentRss>
		</item>
		<item>
		<title>What&#8217;s New in Edraw office Viewer Component V6</title>
		<link>http://www.ocxt.com/archives/149</link>
		<comments>http://www.ocxt.com/archives/149#comments</comments>
		<pubDate>Thu, 28 May 2009 07:23:26 +0000</pubDate>
		<dc:creator>office viewer</dc:creator>
		
		<category><![CDATA[Press Release]]></category>

		<guid isPermaLink="false">http://www.ocxt.com/?p=149</guid>
		<description><![CDATA[

Fixed the bug which Word cannot create the work file: check environment temp variables when Vista UAC enabled.


Fixed the bug which MS Word cannot to create in IE protection mode.


SiteLock enables ActiveX control developers to restrict the use of an ActiveX control to a predetermined list of domain names or security zones.


Developing Safer ActiveX Controls [...]]]></description>
			<content:encoded><![CDATA[<ol>
<li>
<div style="margin-top: 0px; margin-bottom: 0px;">Fixed the bug which Word cannot create the work file: check environment temp variables when Vista UAC enabled.</div>
</li>
<li>
<div style="margin-top: 0px; margin-bottom: 0px;">Fixed the bug which MS Word cannot to create in IE protection mode.</div>
</li>
<li>
<div style="margin-top: 0px; margin-bottom: 0px;">SiteLock enables ActiveX control developers to restrict the use of an ActiveX control to a predetermined list of domain names or security zones.</div>
</li>
<li>
<div style="margin-top: 0px; margin-bottom: 0px;">Developing Safer ActiveX Controls to allow special file type to upload or download.</div>
</li>
<li>
<div style="margin-top: 0px; margin-bottom: 0px;">Fixed the bug which failed to create MS Word document consecutively.</div>
</li>
<li>
<div style="margin-top: 0px; margin-bottom: 0px;">Added the Error code return for the http download/upload status.</div>
</li>
<li>
<div style="margin-top: 0px; margin-bottom: 0px;">Fixed the bug which the component closes the Excel document (but leaves Excel running) if I have Excel open in another window.</div>
</li>
<li>
<div style="margin-top: 0px; margin-bottom: 0px;">Fixed the bug which The Excel process in background is still running and not terminated actually.</div>
</li>
<li>
<div style="margin-top: 0px; margin-bottom: 0px;">Now the component can work in IE 7/ IE 8.</div>
</li>
<li>
<div style="margin-top: 0px; margin-bottom: 0px;">Fixed the toolbar region refresh bug when resize PowerPoint object when toolbar is hide.</div>
</li>
<li>
<div style="margin-top: 0px; margin-bottom: 0px;">Fixed the error message &#8220;Attempt to access invalid address&#8221;.</div>
</li>
<li>
<div style="margin-top: 0px; margin-bottom: 0px;">Read-Only. Protect the end user to modify the MS Word document by Calling the OfficeProtectDocument method in the OnDocumentOpened event.</div>
</li>
<li>
<div style="margin-top: 0px; margin-bottom: 0px;">The OfficeProtectDocument method can also protect multiple Excel sheets. It will protect the Excel Charts too. Supports xlNoSelection, xlNoRestrictions and xlUnlockedCells.</div>
</li>
<li>
<div style="margin-top: 0px; margin-bottom: 0px;">Added some methods to support http upload/download.</div>
</li>
<li>
<div style="margin-top: 0px; margin-bottom: 0px;">Provided some methods to disable the hot keys. Prevent the end users to print document, copy and paste.</div>
</li>
<li>
<div style="margin-top: 0px; margin-bottom: 0px;">To avoid the unknown file type in the Windows temporary folder, the component enhanced the WebUrl parse. In the HttpOpenFileFromStream, HttpOpenFileFromServerDir and Open methods, the WebUrl parameter must include the file extend name so that the component know the file type. For example: http://www.ocxt.com/Getfile.aspx?ID=1002&amp;FileName=guid.docx, or http://www.ocxt.com/samples/sample.xls.</div>
</li>
<li>
<div style="margin-top: 0px; margin-bottom: 0px;">Added the OnBeforeDownload, OnDownloadComplete and OnUploadComplete events.</div>
</li>
<li>
<div style="margin-top: 0px; margin-bottom: 0px;">You can set the protect type by setting the first character of &#8220;Password&#8221; parameter. AllowOnlyRevisions = 0: User can only add revision marks to the document. AllowOnlyComments = 1: User can only modify comments in the document. AllowOnlyFormFields = 2: User can only enter data in the form fields in the document. ReadOnly = 3: No changes are allowed to the document. Available since Microsoft Word 2003.</div>
</li>
<li>
<div style="margin-top: 0px; margin-bottom: 0px;">Cancelled the count limitation to open the office document at the same time.</div>
</li>
<li>
<div style="margin-top: 0px; margin-bottom: 0px;">The component is safe for initialization and safe for scripting.</div>
</li>
<li>
<div style="margin-top: 0px; margin-bottom: 0px;">The activex control was signed with the digital certification.</div>
</li>
<li>
<div style="margin-top: 0px; margin-bottom: 0px;">Fixed the bug which  delete the user file.</div>
</li>
<li>
<div style="margin-top: 0px; margin-bottom: 0px;">Fixed the bug which MS Word crashes when closing Print Preview mode.</div>
</li>
<li>
<div style="margin-top: 0px; margin-bottom: 0px;">Use the NotifyCtrlReady event to avoid IE crash when loading an office document automatically.</div>
</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.ocxt.com/archives/149/feed</wfw:commentRss>
		</item>
		<item>
		<title>Edraw PDF Viewer Component V3.2 Released</title>
		<link>http://www.ocxt.com/archives/91</link>
		<comments>http://www.ocxt.com/archives/91#comments</comments>
		<pubDate>Sun, 17 May 2009 13:29:40 +0000</pubDate>
		<dc:creator>office viewer</dc:creator>
		
		<category><![CDATA[Press Release]]></category>

		<guid isPermaLink="false">http://www.ocxt.com/?p=91</guid>
		<description><![CDATA[
PDF Viewer Component is a light weight ActiveX Control which enables your application to display and interact with PDF files. It is identical to Adobe Reader program and adds high speed viewing of PDF documents to your applications easily. Read-Only Support for PDF Viewer! It is a great solution for companies wishing to display read [...]]]></description>
			<content:encoded><![CDATA[<p><a title="PDF Viewer Component" href="http://www.ocxt.com/download/PDFViewerSetup.exe"><img style="border: 0px;" src="http://www.ocxt.com/images/pdfbox.gif" border="0" alt="PDF Viewer Component" width="200" height="188" /></a></p>
<p>PDF Viewer Component is a light weight ActiveX Control which enables your application to display and interact with PDF files. It is identical to Adobe Reader program and adds high speed viewing of PDF documents to your applications easily. Read-Only Support for PDF Viewer! It is a great solution for companies wishing to display read only PDF document to their employees while restricting save or save to the underlying data. The control is lightweight and flexible, and gives developers new possibilities for using PDF Reader in a custom solution.</p>
<p><span style="font-family: Verdana;"><span style="color: #ff0000;"><a title="PDF Viewer Component" href="http://www.ocxt.com/download/PDFViewerSetup.exe"><img src="http://www.ocxt.com/images/btn_down.gif" border="0" alt="Free download PDF Viewer Component" width="108" height="22" /></a><span style="color: #000000;">                   </span><span style="font-family: Verdana; text-decoration: none;"><a title="Buy PDF Viewer Component" href="https://www.regnow.com/softsell/nph-softsell.cgi?item=14621-1"><img src="http://www.ocxt.com/images/btn_buy.gif" border="0" alt="Purchase PDF Viewer Component in a promotional price" width="100" height="22" /></a></span></span></span></p>
<div class="post-content"><span style="font-family: Verdana;"><span style="color: #ff0000;"><strong><span style="color: #ff9900;">Online Demo:</span></strong> </span><a href="http://www.ocxt.com/pdfdemo.php">PDF Viewer Component Online Demo</a><br />
<a href="http://www.ocxt.com/download/pdfviewerref.pdf">Download Printable Develop Manual</a></span></div>
<p style="margin-top: 10px; margin-bottom: 10; margin-right:10px"><span style="font-family: Verdana;"><strong>PDF Viewer Component Features</strong> </span></p>
<ol>
<li>
<div style="margin-top: 10px; margin-bottom: 10; margin-right:10px"><span style="font-family: Verdana;">Seamlessly use the Adobe Reader as the container to render the PDF files. 100% PDF format compatible.</span></div>
</li>
<li>
<div style="margin-top: 10px; margin-bottom: 10; margin-right:10px"><span style="font-family: Verdana;">HTTP/HTTPS Support. With the component it is easy to upload or download file between distant server and client via HTTP/FTP.</span></div>
</li>
<li>
<div style="margin-top: 10px; margin-bottom: 10; margin-right:10px"><span style="font-family: Verdana;">Show/Hide the Save Copy As button which is available in adobe tool bar.</span></div>
</li>
<li>
<div style="margin-top: 10px; margin-bottom: 10; margin-right:10px"><span style="font-family: Verdana;">Show/Hide the PDF Print button in adobe tool bar.</span></div>
</li>
<li>
<div style="margin-top: 10px; margin-bottom: 10; margin-right:10px"><span style="font-family: Verdana;">Show/Hide the scrollbar in PDF viewer.</span></div>
</li>
<li>
<div style="margin-top: 10px; margin-bottom: 10; margin-right:10px"><span style="font-family: Verdana;">Disable the right-click menu in adobe reader window.</span></div>
</li>
<li>
<div style="margin-top: 10px; margin-bottom: 10; margin-right:10px"><span style="font-family: Verdana;">Disable all the hot keys such as Save As, Print, Show/Hide Tool Bar and more.</span></div>
</li>
<li>
<div style="margin-top: 10px; margin-bottom: 10; margin-right:10px"><span style="font-family: Verdana;">The document control represents the PDF document and lets you open, close, save, print and<br />
navigate the PDF document programmatically. Support all the interfaces of Adobe PDF Reader such as zoom, search and navigate. </span></div>
</li>
<li>
<div style="margin-top: 10px; margin-bottom: 10; margin-right:10px"><span style="font-family: Verdana;">A standard ActiveX control which can be called from different programming languages, including C/C++, C#, Delphi, Visual Basic, ASP.NET etc.</span></div>
</li>
<li>
<div style="margin-top: 10px; margin-bottom: 10; margin-right:10px"><span style="font-family: Verdana;">Requires any edition of Adobe PDF Reader is included as part of the comprehensive PDF Viewer Component.</span> </div>
</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.ocxt.com/archives/91/feed</wfw:commentRss>
		</item>
		<item>
		<title>Kill dozens of Excel.exe processes stacking up in Task Manager</title>
		<link>http://www.ocxt.com/archives/133</link>
		<comments>http://www.ocxt.com/archives/133#comments</comments>
		<pubDate>Mon, 16 Feb 2009 07:02:57 +0000</pubDate>
		<dc:creator>office viewer</dc:creator>
		
		<category><![CDATA[Suggest &amp; Feedback]]></category>

		<guid isPermaLink="false">http://www.ocxt.com/?p=133</guid>
		<description><![CDATA[The Edraw Office Viewer Component V5.6 fixed the bug which the component closes the Excel document (but leaves Excel running) if I have Excel open in another window. Fixed the bug which The Excel process in background is still running and not terminated actually.
]]></description>
			<content:encoded><![CDATA[<p>The Edraw Office Viewer Component V5.6 fixed the bug which the component closes the Excel document (but leaves Excel running) if I have Excel open in another window. Fixed the bug which The Excel process in background is still running and not terminated actually.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ocxt.com/archives/133/feed</wfw:commentRss>
		</item>
		<item>
		<title>How to insert HTML table into Word doc using Javascript?</title>
		<link>http://www.ocxt.com/archives/144</link>
		<comments>http://www.ocxt.com/archives/144#comments</comments>
		<pubDate>Fri, 03 Oct 2008 03:41:22 +0000</pubDate>
		<dc:creator>office viewer</dc:creator>
		
		<category><![CDATA[Office Automation]]></category>

		<guid isPermaLink="false">http://www.ocxt.com/?p=144</guid>
		<description><![CDATA[Use Edraw Office Viewer Component to get the Document interface, then you can do it by the office automation.
document.OA1.CreateNew(&#8221;Word.Document&#8221;);
var objWord = document.OA1.ActiveDocument;
var range = objWord.Range(0,0);
var WTable = objWord.Tables.Add(range, 3,3);
WTable.Cell(1,1).Range.Font.Name = &#8220;Times New Roman&#8221;;
   
WTable.Cell(1,1).Range.Text = &#8220;examples 1&#8243;;    
WTable.Cell(1,2).Range.Font.Size = 18;    
WTable.Cell(1,2).Range.Bold = true;   
WTable.Cell(1,2).Range.Font.Italic = true;  
WTable.Cell(1,2).Range.Text = &#8220;examples 2&#8243;;     
WTable.Cell(2,1).Range.ParagraphFormat.Alignment = 1; // 0= Left, 1=Center, 2=Right   
WTable.Cell(2,1).Range.Font.Name = &#8220;Arial&#8221;;   
WTable.Cell(2,1).Range.Font.Size = [...]]]></description>
			<content:encoded><![CDATA[<p>Use Edraw Office Viewer Component to get the Document interface, then you can do it by the office automation.</p>
<p>document.OA1.CreateNew(&#8221;Word.Document&#8221;);<br />
var objWord = document.OA1.ActiveDocument;<br />
var range = objWord.Range(0,0);<br />
var WTable = objWord.Tables.Add(range, 3,3);<br />
WTable.Cell(1,1).Range.Font.Name = &#8220;Times New Roman&#8221;;<br />
   <br />
WTable.Cell(1,1).Range.Text = &#8220;examples 1&#8243;;    <br />
WTable.Cell(1,2).Range.Font.Size = 18;    <br />
WTable.Cell(1,2).Range.Bold = true;   <br />
WTable.Cell(1,2).Range.Font.Italic = true;  <br />
WTable.Cell(1,2).Range.Text = &#8220;examples 2&#8243;;     <br />
WTable.Cell(2,1).Range.ParagraphFormat.Alignment = 1; // 0= Left, 1=Center, 2=Right   <br />
WTable.Cell(2,1).Range.Font.Name = &#8220;Arial&#8221;;   <br />
WTable.Cell(2,1).Range.Font.Size = 12;   <br />
WTable.Cell(2,1).Range.Bold = false;   <br />
WTable.Cell(2,1).Range.ParagraphFormat.Alignment = 2;     <br />
WTable.Cell(3,3).Range.Font.Name = &#8220;Times New Roman&#8221;;    <br />
WTable.Cell(3,3).Range.Font.Size = 14;    <br />
WTable.Cell(3,3).Range.Bold = true;    <br />
WTable.Cell(3,3).Range.Font.Underline = true;  <br />
WTable.Cell(3,3).Range.ParagraphFormat.Alignment = 0;  <br />
WTable.Cell(3,2).Range.Text = &#8220;examples 3&#8243;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ocxt.com/archives/144/feed</wfw:commentRss>
		</item>
		<item>
		<title>Add some text at the end of Word document</title>
		<link>http://www.ocxt.com/archives/76</link>
		<comments>http://www.ocxt.com/archives/76#comments</comments>
		<pubDate>Fri, 05 Sep 2008 01:07:04 +0000</pubDate>
		<dc:creator>office viewer</dc:creator>
		
		<category><![CDATA[Office Automation]]></category>

		<guid isPermaLink="false">http://www.ocxt.com/archives/76</guid>
		<description><![CDATA[How to add some text at the end of document that is opened in Edraw office viewer, Kindly send me java script code so that i can enter signatures in my document. Please reply as soon as possible and send my java script Example.
]]></description>
			<content:encoded><![CDATA[<p>How to add some text at the end of document that is opened in Edraw office viewer, Kindly send me java script code so that i can enter signatures in my document. Please reply as soon as possible and send my java script Example.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ocxt.com/archives/76/feed</wfw:commentRss>
		</item>
		<item>
		<title>Embedding ms office in C# Forms</title>
		<link>http://www.ocxt.com/archives/40</link>
		<comments>http://www.ocxt.com/archives/40#comments</comments>
		<pubDate>Tue, 12 Aug 2008 08:34:09 +0000</pubDate>
		<dc:creator>office viewer</dc:creator>
		
		<category><![CDATA[Office Automation]]></category>

		<category><![CDATA[Tech Support]]></category>

		<guid isPermaLink="false">http://www.ocxt.com/archives/40</guid>
		<description><![CDATA[With Edraw Office Viewer Component, it&#8217;s easy to embed the ms office program in c# froms or html pages. Only drag it to your form, you can call some method to do the office automation directly such create a Word document or initialize an Excel sheet.
1. Download Edraw Office Viewer Component then install it. Or [...]]]></description>
			<content:encoded><![CDATA[<p>With Edraw Office Viewer Component, it&#8217;s easy to embed the ms office program in c# froms or html pages. Only drag it to your form, you can call some method to do the office automation directly such create a Word document or initialize an Excel sheet.</p>
<p>1. Download Edraw Office Viewer Component then install it. Or you can register the officeviewer.ocx using regsvr32 command.<br />
  C:\\WINNT\System32\regsvr32 OfficeVidewer.ocx<br />
2. On successful registration you would get message dialog.<br />
3. Add Office Viewer Active-X control on your form through customize toolbox window.<br />
4. Drag and drop component from toolbox on your form and resize as per requirement.<br />
5. Now add reference for &#8220;Microsoft Word Object Library 11.0&#8243; from add reference on solution explorer. Here I am using Word 2003, so object library version is 11.0.<br />
6. You can see all added reference on solution explorer as shown in figure. Two reference has been added for Edraw Office Viewer  Component (AxOfficeViewer and OfficeViewer) and three libraries for Office &amp; Word (Microsoft.Office.Core and Office and Word).<br />
7. Define a variable for word document in public section of form as<br />
   public Word.Document oDoc;<br />
8. Add following code for button click event<br />
private void button1_Click(object sender, System.EventArgs e)<br />
{<br />
     //Remove Office Viewer Component Title Bar and create a new Word document<br />
     axOfficeViewer1.Titlebar = false;<br />
     axOfficeViewer1.CreateNew(&#8221;Word.Document&#8221;);<br />
     axOfficeViewer1.Activate();<br />
     //Invoke Word properties<br />
     oDoc = (Word.Document)axOfficeViewer1.ActiveDocument;<br />
     oDoc.ActiveWindow.View.Type = Word.WdViewType.wdOutlineView;<br />
     oDoc.ActiveWindow.DisplayRulers = false;<br />
     oDoc.ActiveWindow.DisplayScreenTips = false;<br />
     oDoc.ActiveWindow.DisplayHorizontalScrollBar = false;<br />
     oDoc.ActiveWindow.DisplayVerticalRuler = false;<br />
     oDoc.ActiveWindow.DisplayVerticalScrollBar = true;<br />
}<br />
10. Now you can add text, format it, send mail do all functionalities.<br />
11. You can control all word functionalities to be made available or unavailable programmatically through code with all available objects, properties &amp; Methods of word.</p>
<p> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.ocxt.com/archives/40/feed</wfw:commentRss>
		</item>
		<item>
		<title>Disable Popup Menu in MS Office</title>
		<link>http://www.ocxt.com/archives/87</link>
		<comments>http://www.ocxt.com/archives/87#comments</comments>
		<pubDate>Thu, 07 Aug 2008 13:09:27 +0000</pubDate>
		<dc:creator>office viewer</dc:creator>
		
		<category><![CDATA[Tech Support]]></category>

		<guid isPermaLink="false">http://www.ocxt.com/archives/87</guid>
		<description><![CDATA[You can disable or delete the context menu item in MS Word or Excel by VBA programming.
Word:
OA1.CreateNew &#8220;Word.Document&#8221;
Set objWord = OA1.ActiveDocument
objWord.Application.CommandBars(&#8221;Text&#8221;).Controls(&#8221;Cu&#38;t&#8221;).Enabled = False
objWord.Application.CommandBars(&#8221;Text&#8221;).Controls(&#8221;&#38;Copy&#8221;).Enabled = False
objWord.Application.CommandBars(&#8221;Text&#8221;).Controls(&#8221;&#38;Paste&#8221;).Enabled = False
&#8216;delete item directly
&#8216;objWord.Application.CommandBars(&#8221;Text&#8221;).Controls(1).Delete
&#8216;objWord.Application.CommandBars(&#8221;Text&#8221;).Controls(2).Delete &#8230;.
Excel
OA1.Open &#8220;c:\text.xls&#8221;
Set objExcel = OA1.ActiveDocument
objExcel .Application.CommandBars(&#8221;Cell&#8221;).Controls(&#8221;Cu&#38;t&#8221;).Enabled = False
objExcel .Application.CommandBars(&#8221;Cell&#8221;).Controls(&#8221;&#38;Copy&#8221;).Enabled = False
objExcel .Application.CommandBars(&#8221;Cell&#8221;).Controls(&#8221;&#38;Paste&#8221;).Enabled = False
&#8216;delete item directly
&#8216;objExcel .Application.CommandBars(&#8221;Cell&#8221;).Controls(1).Delete
&#8216;objExcel .Application.CommandBars(&#8221;Cell&#8221;).Controls(2).Delete &#8230;.
]]></description>
			<content:encoded><![CDATA[<p>You can disable or delete the context menu item in MS Word or Excel by VBA programming.</p>
<p>Word:</p>
<p>OA1.CreateNew &#8220;Word.Document&#8221;<br />
Set objWord = OA1.ActiveDocument<br />
objWord.Application.CommandBars(&#8221;Text&#8221;).Controls(&#8221;Cu&amp;t&#8221;).Enabled = False<br />
objWord.Application.CommandBars(&#8221;Text&#8221;).Controls(&#8221;&amp;Copy&#8221;).Enabled = False<br />
objWord.Application.CommandBars(&#8221;Text&#8221;).Controls(&#8221;&amp;Paste&#8221;).Enabled = False<br />
&#8216;delete item directly<br />
&#8216;objWord.Application.CommandBars(&#8221;Text&#8221;).Controls(1).Delete<br />
&#8216;objWord.Application.CommandBars(&#8221;Text&#8221;).Controls(2).Delete &#8230;.</p>
<p>Excel</p>
<p>OA1.Open &#8220;c:\text.xls&#8221;<br />
Set objExcel = OA1.ActiveDocument<br />
objExcel .Application.CommandBars(&#8221;Cell&#8221;).Controls(&#8221;Cu&amp;t&#8221;).Enabled = False<br />
objExcel .Application.CommandBars(&#8221;Cell&#8221;).Controls(&#8221;&amp;Copy&#8221;).Enabled = False<br />
objExcel .Application.CommandBars(&#8221;Cell&#8221;).Controls(&#8221;&amp;Paste&#8221;).Enabled = False<br />
&#8216;delete item directly<br />
&#8216;objExcel .Application.CommandBars(&#8221;Cell&#8221;).Controls(1).Delete<br />
&#8216;objExcel .Application.CommandBars(&#8221;Cell&#8221;).Controls(2).Delete &#8230;.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ocxt.com/archives/87/feed</wfw:commentRss>
		</item>
		<item>
		<title>How to verify whether the open document was modified</title>
		<link>http://www.ocxt.com/archives/49</link>
		<comments>http://www.ocxt.com/archives/49#comments</comments>
		<pubDate>Tue, 15 Jul 2008 04:45:37 +0000</pubDate>
		<dc:creator>office viewer</dc:creator>
		
		<category><![CDATA[Tech Support]]></category>

		<guid isPermaLink="false">http://www.ocxt.com/archives/49</guid>
		<description><![CDATA[If you are developing the destop application with the office viewer component, you can use the &#8220;IsDirty&#8221; method to verify whether the open document is modified. When the open file has any modification, the IsDirty method return TRUE. After you save the document, the IsDirty return False again.
But if you are developing the web application, [...]]]></description>
			<content:encoded><![CDATA[<p>If you are developing the destop application with the office viewer component, you can use the &#8220;IsDirty&#8221; method to verify whether the open document is modified. When the open file has any modification, the IsDirty method return TRUE. After you save the document, the IsDirty return False again.</p>
<p>But if you are developing the web application, you need to add some extra codes. Because you are opening a file from remote server and the component can&#8217;t watch the file like destop application.</p>
<p>A good method is set another variable in your application. When you save the document, you set the variable true. Any time you can judge the dirty by the IsDirty method and your own variable.</p>
<p><span style="font-size: x-small; font-family: Tahoma;">BOOL GetIsDirty(){<br />
if(OA.IsDirty()==Flase) return False;<br />
else return m_bDirty;<br />
}<br />
event OnDocumentOpened()<br />
{<br />
m_bDirty = false;<br />
}<br />
function UploadFile()<br />
{<br />
&#8230;&#8230;<br />
m_bDirty = False;<br />
}</span><span style="font-size: 10pt; font-family: Tahoma;"><span style="font-size: x-small; font-family: Tahoma;"></span></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ocxt.com/archives/49/feed</wfw:commentRss>
		</item>
		<item>
		<title>Open Excel From File Stream Using .NET</title>
		<link>http://www.ocxt.com/archives/79</link>
		<comments>http://www.ocxt.com/archives/79#comments</comments>
		<pubDate>Mon, 14 Jul 2008 16:20:23 +0000</pubDate>
		<dc:creator>cathy</dc:creator>
		
		<category><![CDATA[Tech Support]]></category>

		<guid isPermaLink="false">http://www.ocxt.com/?p=79</guid>
		<description><![CDATA[After installed the latest demo version,  you can open the excel from file stream using the following code:
objExcel.HttpInit();
objExcel.HttpAddPostFile(&#8221;",&#8221;Evaluation.xlsx&#8221;);
objExcel.HttpOpenFileFromStream(&#8221;Evaluation/EvaluationReceiver.aspx&#8221;);
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 [...]]]></description>
			<content:encoded><![CDATA[<p>After installed the latest demo version,  you can open the excel from file stream using the following code:</p>
<p>objExcel.HttpInit();</p>
<p>objExcel.HttpAddPostFile(&#8221;",&#8221;Evaluation.xlsx&#8221;);</p>
<p>objExcel.HttpOpenFileFromStream(&#8221;Evaluation/EvaluationReceiver.aspx&#8221;);</p>
<p>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.<br />
m_OAHttp.AddPostArgument(L&#8221;EDA_GETSTREAMDATA&#8221;, L&#8221;EDA_YES&#8221;); This couple of parameters tell the destinated webpage OfficeViewer will received file as stream.</p>
<p>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 &#8216;EDA_STREAMBOUNDARY&#8217; to file data, following is the asp.net demo.</p>
<p>if (Request.Params["EDA_GETSTREAMDATA"] == &#8220;EDA_YES&#8221;)<br />
{<br />
  String fullFileName = Server.MapPath(Request.Params["DocumentID"]);<br />
  Byte[] fs = File.ReadAllBytes(fullFileName);</p>
<p>  Response.Write(&#8221;Get Stream Successfully!&#8221;);<br />
  Response.Write(&#8221;EDA_STREAMBOUNDARY&#8221;);<br />
  Response.BinaryWrite(fs);<br />
  Response.Write(&#8221;EDA_STREAMBOUNDARY&#8221;);<br />
}</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ocxt.com/archives/79/feed</wfw:commentRss>
		</item>
	</channel>
</rss>
