ms-word

Long operations crash Office addin (JS)

|▌冷眼眸甩不掉的悲伤 提交于 2021-02-04 08:09:06
问题 I just created a (JS) Word Add-in and found that long synchronous operations can make it crash. In these cases, the following error is displayed - [ADD-IN ERROR Sorry, we had to restart because this add-in wasn't responding.] The following code is ran on a button click. function scanText() { Word.run(function (context) { var body = context.document.body; context.load(body, 'text'); return context.sync().then(function () { var r = thisOperationCanTakeALongTimeIfDocIsLarge(body.text); }); })

Long operations crash Office addin (JS)

帅比萌擦擦* 提交于 2021-02-04 08:03:08
问题 I just created a (JS) Word Add-in and found that long synchronous operations can make it crash. In these cases, the following error is displayed - [ADD-IN ERROR Sorry, we had to restart because this add-in wasn't responding.] The following code is ran on a button click. function scanText() { Word.run(function (context) { var body = context.document.body; context.load(body, 'text'); return context.sync().then(function () { var r = thisOperationCanTakeALongTimeIfDocIsLarge(body.text); }); })

Identify Font File Used in Microsoft Word 2010 [closed]

自闭症网瘾萝莉.ら 提交于 2021-01-29 17:19:21
问题 Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 12 months ago . Improve this question I know that the font files used by Microsoft Word is located at C:\Windows\Fonts I am particularly concern about the font OCR A Std . I want to locate the font files for the OCR A Std regular font, bold font, italic font and bold italic font. Below are the

Display the final proposed text in Tracked Change without accepting the change

五迷三道 提交于 2021-01-29 16:46:39
问题 I am trying to write a Macro that can display the final proposed text in a tracked change without having to accept the change. Current code (modified from thedoctools.com) is as follows which uses a Revision object only for Delete and Insert types: Public Sub ExtractAllRevisionsToExcel() Dim oDoc As Document Dim xlApp As Excel.Application Dim xlWB As Excel.Workbook Dim oNewExcel As Worksheet Dim oRange As Range Dim oRevision As Revision Dim strText As String Dim index As Long Dim Title As

Word Macro to change footer font size and set it different from the different headers and the body in the documents?

对着背影说爱祢 提交于 2021-01-29 15:03:06
问题 I am trying to set a different font size for the footer in the document from the rest of the body. Moreover, how can I change font size of certain headings in the document without having knowledge of what the heading size might be? Any help would be appreciated! I am posting what I tried so far. Thank you! Sub MyMacro() Selection.ParagraphFormat.LineSpacing = LinesToPoints(1.5) Set myRange =ActiveDocument.Sections.First.Headers(wdHeaderFooterPrimary).Range With myRange.Font .Name = "Palatino

How do I change a Microsoft Word Content Control placeholder text format using a VBA script?

冷暖自知 提交于 2021-01-29 14:28:56
问题 I have created a Microsoft Word Form using interactive Content Controls. It is a really long form with a variety of fields and field types (drop down lists, text boxes, combo boxes, check boxes, etc...) After a couple of months and multiple edits it came back to me with inconsistent formatting of field values and placeholder text values. Some fields stay grayed out even after you fill them out. Other fields have placeholder text that is not grayed out at all. The font seems to have

Extracting data from Word to Excel

ε祈祈猫儿з 提交于 2021-01-29 14:09:36
问题 Sub GetFormData() 'Note: this code requires a reference to the Word object model. 'See under the VBE's Tools|References. Application.ScreenUpdating = False Dim wdApp As New Word.Application, wdDoc As Word.Document Dim FmFld As Word.FormField, CCtrl As Word.ContentControl Dim strFolder As String, strFile As String Dim WkSht As Worksheet, i As Long, j As Long strFolder = GetFolder If strFolder = "" Then Exit Sub Set WkSht = ActiveSheet i = WkSht.Cells(WkSht.Rows.Count, 1).End(xlUp).Row 'Disable

Microsoft word clipboard HTML documentation

廉价感情. 提交于 2021-01-29 13:52:44
问题 I could not find any documentation describing conventions in text/html data in the clipboard resulting from copying part of a word document! Specifically I want to know what classes like MsoNormal, TableGrid313, MsoTableGrid, MsoHeading9, MsoListParagraph are there! Or does styling information of texts always lay in style attribute of a span element containing the text? 回答1: The Word round-tip HTML is undocumented as it's not an official Word file format. It was created to enable round

Using Excel VBA, how to search for a specific word and insert comments against that word in a Word document?

混江龙づ霸主 提交于 2021-01-29 12:51:58
问题 I am trying to create an excel based tool that reviews Word documents for specific errors. I want this tool to search for a word/sentence and insert a comment against it. I have written a code (please see below) that is able to highlight the word/sentence, however, unable to insert the comment. Here is my code so far: Sub Ref_Figs_Tbls() Dim wdDoc As Object Set wdDoc = ActiveDocument With wdDoc With .Range With .Find .ClearFormatting .Replacement.ClearFormatting .MatchWildcards = True .Wrap =

Replace superscript of Footnote reference in the footnotes only

ε祈祈猫儿з 提交于 2021-01-29 09:23:55
问题 I am trying to convert the footnotes into a specific font style (Chicago Style). I have managed to change font of footnotes separately but I can't refer to the footnote reference number in the footnotes of the pages. I am trying to convert the superscript into a normal number and can't get the code to work for some reason. It keeps changing the superscripts in the rest of the body of the document which is not what I am looking for because reference number in body are kept superscripted. Any