ms-office

Windows keyboard hook API in VBA causes infinite loop in PowerPoint

余生颓废 提交于 2020-03-05 02:52:27
问题 I've built a simple VBA module to set a keyboard hook and a corresponding procedure to detect a pre-defined key combination (ctrl+3). It works perfectly except that when a user tries types in a window of the hosting app (PowerPoint), the code runs into an infinite loop causing the app to hang/crash. Here is the complete module with reproduction instructions: ' =========================================================================== ' Module : MOD_Keyboard_Shortcuts ' Purpose : Create pre

What is the correct way to implement bullet functionality in powerpoint Autoshape

那年仲夏 提交于 2020-02-25 07:11:06
问题 I made a function to apply custom bullets up to 5 levels parent, level 1, level 2, level 3 and none. shapeR.TextFrame.Ruler.Levels[1].FirstMargin = 0; shapeR.TextFrame.Ruler.Levels[1].LeftMargin = (float)40.53543; shapeR.TextFrame.Ruler.Levels[2].FirstMargin = 60; shapeR.TextFrame.Ruler.Levels[2].LeftMargin = (float)100.53543; shapeR.TextFrame.Ruler.Levels[3].FirstMargin = 120; shapeR.TextFrame.Ruler.Levels[3].LeftMargin = (float)160.53543; shapeR.TextFrame.Ruler.Levels[4].FirstMargin = 180;

How To Disable “The document being saved contains tracked changes” Word Dialog Using C#

谁说胖子不能爱 提交于 2020-02-23 10:33:05
问题 Microsoft.Office.Interop.Word.ApplicationClass msDoc = new Microsoft.Office.Interop.Word.ApplicationClass(); msDoc.Visible = false; msDoc.Application.Visible = false; msDoc.Documents.Open(ref docPath, ref UNKNOWN, ref READ_ONLY, 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.WindowState = Microsoft.Office.Interop.Word.WdWindowState.wdWindowStateMinimize; object

C# convert .doc to .htm

北城余情 提交于 2020-02-15 08:15:31
问题 I am trying to convert .doc file to .htm format to view in an ASP.NET MVC page. I am using the following code in C# : using Microsoft.Office.Core; using Microsoft.Office.Interop.Word; .... Microsoft.Office.Interop.Word.Application objWord = new Microsoft.Office.Interop.Word.Application(); object source = @"C:\Users\XYZ\Desktop\ScreenShot.doc"; object target = @"C:\Users\XYZ\Desktop\ScreenShot.html"; object unknown = Type.Missing; objWord.Documents.Open(ref source, ref unknown, ref unknown,

C# convert .doc to .htm

帅比萌擦擦* 提交于 2020-02-15 08:15:16
问题 I am trying to convert .doc file to .htm format to view in an ASP.NET MVC page. I am using the following code in C# : using Microsoft.Office.Core; using Microsoft.Office.Interop.Word; .... Microsoft.Office.Interop.Word.Application objWord = new Microsoft.Office.Interop.Word.Application(); object source = @"C:\Users\XYZ\Desktop\ScreenShot.doc"; object target = @"C:\Users\XYZ\Desktop\ScreenShot.html"; object unknown = Type.Missing; objWord.Documents.Open(ref source, ref unknown, ref unknown,

MS Office hyperlinks change code page?

我的梦境 提交于 2020-01-25 09:39:04
问题 When you paste the following URL into IE: http://technet.microsoft.com/en-us/sysinternals/bb897434.aspx, the link on the right of the page cleanly says "Download Zoomit (77 KB)". If you paste the link into an Office document (Word, Excel, PowerPoint -- tested using Office 2003), and activate the link from the document, that same text has picked up a couple of A-circumflex symbols. This is because the source HTML contains " " entities (non-breaking space) which get translated to Unicode 00A0.

MS Office opens documents readonly with WebDAV

删除回忆录丶 提交于 2020-01-24 13:54:05
问题 We implemented our own WebDAV server. Some users having Office (Word, Excel) open documents read-only. On problem computers queries are next: OPTIONS http://pastie.org/10957339, response (after some chain of NTLM auth): http://pastie.org/10957337 (equal to these ones, where problem not reproduces) GET HEAD HEAD Normal queries (on healthy computers) are: OPTIONS, HEAD, LOCK, GET... So, Word do not attempts to LOCK document, and opens it readonly. We have already tried: Checked WebDAV link, it

MS Office opens documents readonly with WebDAV

杀马特。学长 韩版系。学妹 提交于 2020-01-24 13:54:05
问题 We implemented our own WebDAV server. Some users having Office (Word, Excel) open documents read-only. On problem computers queries are next: OPTIONS http://pastie.org/10957339, response (after some chain of NTLM auth): http://pastie.org/10957337 (equal to these ones, where problem not reproduces) GET HEAD HEAD Normal queries (on healthy computers) are: OPTIONS, HEAD, LOCK, GET... So, Word do not attempts to LOCK document, and opens it readonly. We have already tried: Checked WebDAV link, it

What is the difference between Office Automation, VSTO, and Open XML SDK?

久未见 提交于 2020-01-24 03:52:25
问题 What is the difference between Office Automation, VSTO, and Open XML SDK? Do we need all of them or some of them are obsolete? 回答1: Office Automation refers to the manipulation of an Office program (or, more commonly, an Office document via an Office program) programmatically, using COM interop. Visual Studio Tools for Office (VSTO) is a set of development tools available in the form of a Visual Studio add-in (project templates) and a runtime that allows Microsoft Office 2003 and later

What is the fastest way of replacing the text of many content controls via office-js?

怎甘沉沦 提交于 2020-01-23 16:49:26
问题 I wrote the following function to replace a huge amount of CCs with specified values: /** replaceManyCCs() * * Replaces the content of many content controls, based on the replacementObject. * * @arg replacementObject A dictionary. The keys are the titles of the CCs which should be replaced. The values are the replacement values. */ function replaceManyCCs (replacementObject) { Word.run(function (context) { var time1 = Date.now(); // load the title of all content controls var CCc = context