ms-word

export html table as word file and change file orientation

自闭症网瘾萝莉.ら 提交于 2020-01-11 19:42:40
问题 I have jquery function which exporting html table to word file. Function works great, but I need to rotate a word file to landsacpe orientation. Can somebody help me? Here is js function: <SCRIPT type="text/javascript"> $(document).ready(function () { $("#btnExport").click(function () { var htmltable= document.getElementById('tblExport'); var html = htmltable.outerHTML; window.open('data:application/msword,' + '\uFEFF' + encodeURIComponent(html)); }); }); Response.AddHeader("Content

MS Word - VBA - Adding document property field to footer removes existing page numbering

落爺英雄遲暮 提交于 2020-01-11 14:09:51
问题 I am tying to stamp a document variable field in the footer of every page in a document. I have figured out how to add the field. However, in doing so, the page numbering field that already exists in the footer becomes disabled, leaving only the text and no longer acting as a dynamic page number. Any help would be appreciated. Here is my code that adds the field, but disables the page numbers somehow. (the "sectionFooter.Range.Text = sectionFooter.Range.Text + " "" line is the only way I

How to add phonetic guides to all the texts at once?

偶尔善良 提交于 2020-01-11 13:22:09
问题 I have an essay with roughly 1000 Chinese words. I want to add phonetic guide (Pin Yin) on top of each Chinese word. Therefore, in MS Words, I use Phonetic Guide. However, Phonetic Guide only allows me to create Pin Yin for 20 to 30 words each time. I tried to look for a function which allows me to add phonetic guides for all the words at once, but I cannot find an answer online. I also want to make the phonetic guide font bigger and create more space between the Chinese text and the Pin Yin.

Word 2007 VBA - Making some text BOLD & other ITALIC

喜你入骨 提交于 2020-01-11 10:23:21
问题 I have the following code that selects data from an Excel Cell & replaces a specific piece of text in my Word document (for purposes of this question, the Excel Cell has been replaced by a plain text string). The data ": goes to " is constant, then the data "aaa bbb" can be anything until we reach the " of " which is also constant. Then the data after the " of ", "ccc ddd eee" can be anything until it hits the " - " which is also constant. Is it possible to make the "aaa bbb" data BOLD &

Excel VBA quit Word document

北慕城南 提交于 2020-01-11 09:22:06
问题 I have a macro that inserts select cells of an Excel document into a Word template, copies the entire Word document then closes the document without saving, to preserve certain keywords. However when it closes the Word document it leaves a blank Word window open, with no active document, and each time the macro runs it leaves a new blank window. Dim appWd As Word.Application Dim wdFind As Object Dim ClipEmpty As New MSForms.DataObject Dim ClipT As String Sub CopyDatatoWord() Dim docWD As Word

Read word document (*.doc) content with tables etc

人走茶凉 提交于 2020-01-11 05:27:09
问题 I have a word document (2003). I am using Powershell to parse the content of the document. The document contains a few lines of text at the top, a dozen tables with differing number of columns and then some more text. I expect to be able to read the document as something like the below: Read document (make necessary objects etc) Get each line of text If not part of a table, process as text and Write-Output else If part of a table Get table number (by order) and parse output based on columns

How to open document that contains AutoOpen macro with PowerShell?

[亡魂溺海] 提交于 2020-01-10 02:59:09
问题 My current PowerShell script: $document = "C:\\test.doc" $word = new-object -comobject word.application $word.Visible = $false $word.DisplayAlerts = "wdAlertsNone" $word.AutomationSecurity = "msoAutomationSecurityForceDisable" $doc = $word.Documents.Open($document) $word.ActivePrinter = "\\http://ptr-server:631\pdf-printer" $background = $false $doc.PrintOut([ref]$background) $doc.close([ref]$false) $word.quit() But it results in an alert box The macros in this project are disabled. Please

Add Header and Footer to an existing empty word document with OpenXML SDK 2.0

岁酱吖の 提交于 2020-01-10 01:04:06
问题 I'm trying to add a Header and Footer to an empty word document. I use this code to add Header part in word/document.xml when change docx to zip. ApplyHeader(doc); public static void ApplyHeader(WordprocessingDocument doc) { // Get the main document part. MainDocumentPart mainDocPart = doc.MainDocumentPart; // Delete the existing header parts. mainDocPart.DeleteParts(mainDocPart.HeaderParts); // Create a new header part and get its relationship id. HeaderPart newHeaderPart = mainDocPart

Using Fractions On Websites

梦想与她 提交于 2020-01-09 12:02:06
问题 Is it possible to use any fraction symbol on a website, represented as ¼ rather than 1/4 for example? From what I've gathered, these are the only ones I can use: ½ ⅓ ⅔ ¼ ¾ Is this right and why is that? The reason why I ask this is because I've done a Google web search and can't seem to locate any others ... eg. 2/4 回答1: You can test http://www.mathjax.org/ it is a JavasScript library to make a Math Formula if this is what you want. 回答2: The image below displays all unicode-defined fraction

Using Fractions On Websites

喜欢而已 提交于 2020-01-09 12:02:05
问题 Is it possible to use any fraction symbol on a website, represented as ¼ rather than 1/4 for example? From what I've gathered, these are the only ones I can use: ½ ⅓ ⅔ ¼ ¾ Is this right and why is that? The reason why I ask this is because I've done a Google web search and can't seem to locate any others ... eg. 2/4 回答1: You can test http://www.mathjax.org/ it is a JavasScript library to make a Math Formula if this is what you want. 回答2: The image below displays all unicode-defined fraction