ms-word

VBA Word add captions to images, add max height criterion

孤者浪人 提交于 2020-01-06 20:13:25
问题 I have here a nice algorithm, that adds serveral pictures to a word document and gives as caption the filename without extension, for me it is very usefull and productive, I share the code below, I recommend it for large documents/reports. I need to improve this code by giving a max height or Width to the image in the document, so it wont ocupy that much space. can anyone give a hint how to do that fast and easy? maybe with the Shaperange-object? see VBA-documentation Option Explicit Sub

VBA Word add captions to images, add max height criterion

倖福魔咒の 提交于 2020-01-06 20:13:21
问题 I have here a nice algorithm, that adds serveral pictures to a word document and gives as caption the filename without extension, for me it is very usefull and productive, I share the code below, I recommend it for large documents/reports. I need to improve this code by giving a max height or Width to the image in the document, so it wont ocupy that much space. can anyone give a hint how to do that fast and easy? maybe with the Shaperange-object? see VBA-documentation Option Explicit Sub

How to split pages of a Word document into separate files in c# [closed]

喜你入骨 提交于 2020-01-06 19:59:38
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 7 years ago . I have an OCR program that converts images to word documents. The word document contains text of the all images, and I want to split it into separate files. Is there any way to do this in c#? thanks 回答1: Same as

Subclassing MS Word's window from a VSTO add-in

元气小坏坏 提交于 2020-01-06 19:36:49
问题 I'm trying to detect some events that VSTO doesn't provide such as WM_MOVE, WM_SIZE, etc in order to adjust the position of a window. This window is created by the add-in I'm working on and should react when the Word window is changed. I've basically manage to do my task but a very annoying problem remains. Whenever I close Word it pops up its crash handler. Obviously, this has something to do with the improper disposal of the NativeWindow-based object that I use. I've placed a button in the

how can i save content of current webpage in word through php

浪尽此生 提交于 2020-01-06 19:25:13
问题 i need to save contents of webpage on word. i need to keep the links and formating too. if i send $ter=$ter. "<a href='$url'>".$chunk."</a> "; $fp = fopen("test.doc", 'w+'); $str = $ter; fwrite($fp, $str); fclose($fp); i get a word document but i loose the links ..it comes out as a href='http://www.google.com/search?q=sells+sea+shells%0D%0A'>sells sea shells 回答1: Going along with this weird pretend ".doc" file which Word (2007) does seem to display as a document; if I change your fwrite line:

how can i save content of current webpage in word through php

喜夏-厌秋 提交于 2020-01-06 19:25:12
问题 i need to save contents of webpage on word. i need to keep the links and formating too. if i send $ter=$ter. "<a href='$url'>".$chunk."</a> "; $fp = fopen("test.doc", 'w+'); $str = $ter; fwrite($fp, $str); fclose($fp); i get a word document but i loose the links ..it comes out as a href='http://www.google.com/search?q=sells+sea+shells%0D%0A'>sells sea shells 回答1: Going along with this weird pretend ".doc" file which Word (2007) does seem to display as a document; if I change your fwrite line:

How to highlight text in a Word document using Visual Basic

这一生的挚爱 提交于 2020-01-06 18:12:32
问题 I can't believe I'm not able to find the answer to this (simple) question, but I can't. (This for instance didn't really help, nor could I find an answer here.) All I want to do is to figure out how to use Visual Basic (not VBA) to programmatically (i) change the font colour in a specific paragraph or range in a Word document, or (ii) highlight the same text in the document. I've used various permutations of: myDoc.range.font.ColorIndex = Word.WdColor.wdColorRed myDoc.range.Highlight = Word

VBA Word Changing table row and column size in

怎甘沉沦 提交于 2020-01-06 16:23:07
问题 nested table in WordI have a template which is essentially a 4-row column in Work. Each cell marked with a bookmark. I've copied a table from Excel to Word into one of these bookmarks (inside on of the cells). Now I'm trying to format this 'nested table' to make it fit according to my desired column widths (for certain columns) but I'm really struggling with the syntax. Additionally, in the table, the first row contains some merged cells (Some are merged to the cell in the adjacent column and

VBA Word Changing table row and column size in

情到浓时终转凉″ 提交于 2020-01-06 16:21:19
问题 nested table in WordI have a template which is essentially a 4-row column in Work. Each cell marked with a bookmark. I've copied a table from Excel to Word into one of these bookmarks (inside on of the cells). Now I'm trying to format this 'nested table' to make it fit according to my desired column widths (for certain columns) but I'm really struggling with the syntax. Additionally, in the table, the first row contains some merged cells (Some are merged to the cell in the adjacent column and

How to add a text in existing .docx file on desired location

元气小坏坏 提交于 2020-01-06 14:07:02
问题 I want to open an existing .docx file and insert some text in second paragraph. Private Sub insertText() Dim WordApp As New Microsoft.Office.Interop.Word.Application Dim aDoc As Microsoft.Office.Interop.Word.Document = WordApp.Documents.Open("C:\File1.docx") Dim RNG As Microsoft.Office.Interop.Word.Range() end sub Now what should I write to insert some text in second para ?? Any help will be greatly appreciated. Thanks in advance. 回答1: You can use Application.Selection.TypeText() for that: