2
votes
0answers
54 views

copy data from multiple word files to excel with vba

I know this question was already asked (Copying data from multiple word docs into one excel sheet) the thing is I can't use the answer. I'm fresh to vba, but I thought I can handle it. I was wrong. I ...
1
vote
0answers
18 views

Convert HTML to Word and embed file hyperlinks as attachments.

I have some HTML files that I'm opening with Word and saving as docx files. I have some macros I run to break the links on the graphics so that they get embedded in the doc file, but I haven't figured ...
0
votes
0answers
12 views

Word crashes when printing with cursor in table

I've been doing some VBA in word to create reports and certifications. These docs include tables. I need to print my docs, but when I try, Word crashes. I find out that if the cursor is inside a ...
1
vote
2answers
69 views

Word - Extract picture 'alt text - description'

I have a word document with 500+ embedded images. For each image in the document, I want to get the 'Description' from the 'Alt text' section of the image (when you right click on an ...
1
vote
0answers
28 views

MS Word 2010 macro to renumber pages within the footer of all sections.

My problems is that I also have a divider page which originally I provided -1 in the page field to get the appropriate count. Could you please advise how I can manipulate the macro to take this back ...
0
votes
0answers
58 views

How do I Mail Merge from a SQL DB to Word 2013 with a date filter?

I have a SQL database view that returns the data I need for my mail merge. This data needs to be filtered by a Date Range. i.e. >1/1/2014 and <3/1/2014 I have attempted to put it in the filter ...
2
votes
1answer
83 views

Getting the index entries of a Word document in VBA

I have a collection of Word docx files in various subfolders. I need to create an index file with links back to the original files. I thought that VBA might be the easiest way to do this. I can find a ...
0
votes
0answers
45 views

How do I really enable events in Word VBA?

I've found the instructions to enable events, but this does not always work. When I create a new document from a template events are not enabled. I've got the class module to have word run with ...
1
vote
1answer
34 views

How do I access a new document in vba?

I made a .dot template with a few macros. However, when I create a new document based on the template I run into trouble. If I reference activedocument, I get the message that no document is open. So ...
0
votes
0answers
111 views

How do I set spacing between paragraphs while keeping numbering in word vba?

I'm trying to write a macro that does the following to a selection: Keeps paragraphs that are numbered numbered Keeps paragraphs that are unnumbered unnumbered Sets line and paragraph spacing Puts ...
0
votes
3answers
66 views

Are there events defined in the word vba object model for these events?

First of all, I did look and did not find any. I want a macro to run whenever one of the following happens: The document is opened The document is saved Text is pasted into the document The ...
2
votes
0answers
150 views

How do I replace all breaks in a selection in Word using VBA?

I've got a part of a document selected, and now I want to replace all manual page and section breaks (the latter of all types, such as next page even, next page uneven, next page, continuous, column) ...
0
votes
1answer
534 views

How do I select text between two “bookmarks” in Word VBA?

Note: Originally I asked how to select text from a certain point downward, but I've got a solution for that: Dim f As Word.Field For Each f In ActiveDocument.Fields If f.Type = wdFieldAddin And ...
0
votes
0answers
26 views

Macro for hiding table colums, in multipile files, and another on to reverse it

I know almost anything about VBA so I can't really code the Macro that I need for MS Word. I hope that I could get some help here. The basic functionality that I want is to take a Word document with ...
1
vote
2answers
66 views

How do I split a directory when a field changes in Word 2010?

I'm creating a directory mail merge in Word 2010 using an xlsx file as the record source. One of my fields is "Manager". Most of the fields will be different on every line, but Manager will be ...
4
votes
2answers
313 views

Counting pages within Word [.doc] documents

I'm trying to find a way of listing the number of pages within multiple word documents, all saved within the same folder. Is this possible using VBA? I am using: Windows 7 and Microsoft Office 2007 ...
3
votes
2answers
295 views

Extract data from delinked Excel plot

I have a Word file which has some Excel plots in it. Unfortunately I lost the original excel plots and the word file is now 'de-linked'. Is there a way to retrieve the lost data for the plots? Just ...
0
votes
1answer
377 views

Printing a Word Document in Colour using VBA code to print

I have a word document that we do not want the users to edit once it had been generated from the database. We have set up a VBA module to print the document automatically after opening, but we need ...
1
vote
1answer
1k views

Copying data from multiple word docs into one excel sheet

I have about 4000 doc and docx files which contain a table. I've managed to import these into one excel sheet using the following script: Sub Macro1() Dim xl As Object Set xl = ...
0
votes
1answer
514 views

Break link to picture programatically in MS Word 2010

I have a Word document with pictures that are linked. I want to embed them to the word document, but I do not want to do it manually. Manually going to: File --> edit links to files --> selecting and ...
0
votes
1answer
710 views

How can I apply a style to the footer in Word 2010 with VBA?

I have a macro in a Word document that generates a footer based on Bookmarks. It works, except for one detail: in one of the Ref-fields in the footer, the font is always incorrect after updating. ...
0
votes
1answer
1k views

Word/VBA Find..Replace with wildcards and escape </>

I'd like to format (e.g. highlight) special words in a Word document via VBA. In general this works nicely, but in this casde I need to find something like <*> (words enclosed in "<" and ">" ...
1
vote
1answer
1k views

Insert Hyperlink via VBA

I have a Word VBA macro that loops through a directory and writes down the file path of files selected for some criteria into a new Word document. Works well as plain text (as part of a loop): ...
1
vote
0answers
101 views

Pasting and re-sizing a screenshot

I often take screen shots of random drawings and i want to re-size them using a macro. I want the macro to automatically paste the screenshot then re-size it to fit to a height of 5.9 inches and a ...
2
votes
3answers
769 views

Bring back the object browser in Word 2013

In previous Word versions there was a very handy feature called "object browser" that allowed you to quickly navigate a document. Here is a very simple explanation of what it does: ...
1
vote
1answer
2k views

Word macro that loops through a table and stops at the end

I have movie scripts. First column is time code, second column is speaker, third column is dialog. I want to loop through the entire script, but only doing something to the third column (dialog). I ...
2
votes
0answers
309 views

Fitting images to document's margins in a docx file

I've got a docx file with many figures, all do not fit the margins of the document. I can manually adjust the sizes of the figures in the file, but would love to have some way to automate this ...
0
votes
1answer
937 views

How to count instances a certain style has been applied via VBA?

In Word one can click the pull-down menue of a style in the style-window and it shows how often that style has been applied throughout the active document. So this is an information which is readily ...
0
votes
1answer
271 views

Word: update document location field, that has not been saved yet

So since VBA doesn't has a onSave or afterSave event i have troubles finding a way to save my document AND updateing the Document-Location (after it has been saved). So the most common way this ...
3
votes
1answer
1k views

VBA to save document in Excel and Word periodically (AutoBackup)

I want to create a VBA script that would save a copy of the document every 5-10 minutes with a new name. The script would keep like 10-15 copies in the same folder, incrementing a number each time. If ...
1
vote
2answers
373 views

how to remove or change background fills in all tables in a microsoft word document

I have a bunch of large documents, with many tables that have different and inconsistent fill styles - some of them are not readable in black and white when printed. I cannot change the background ...
0
votes
1answer
156 views

Insert Index entry at specific position

Selection.TypeText ("(" & Abbreviation & " placeholder )") IndexEntryRange = ActiveDocument.Indexes.MarkEntry(Range:=Selection.Range, Entry:=Abbreviation, CrossReference:=Definition, ...
0
votes
1answer
220 views

Extract change pages from Word (2007) file

Is it possible to write a macro which will extract only the pages from a Word document that contain changes and save them to a separate file?
3
votes
2answers
748 views

Edit date field code on multiple Word Documents

I have multiple word documents that have a date field code displaying the current date. I need a way to modify each document so that it shows the CreateDate field instead of Date. The format for each ...
11
votes
4answers
1k views

How to programmatically iterate through subscripts,superscripts and equations found in a Word document

I have a few Word documents, each containing a few hundred pages of scientific data which includes: Chemical formulae (H2SO4 with all proper subscripts & superscripts) Scientific numbers ...
1
vote
3answers
548 views

Compare Spreadsheet to Database to Generate Document

I am trying to streamline the production of a document that has to be created on a regular basis. There are tasks associated with detailed instructions on how to complete them, and each of these has ...
1
vote
2answers
1k views

Microsoft Word keyboard shortcuts for macros aren't working

At work, I have several Word 2007 macros in a Normal.dotm template. Under Windows XP, I had some of the macros assigned to keyboard shortcuts, e.g. Ctrl+Shift+9. Everything worked perfectly. Our IT ...
1
vote
2answers
270 views

Assembling Word Doc using Data from Excel- MS Office 2010

I have a questionnaire that users complete. It is in Excel. After users complete the questionnaire I would like to be able to generate a Word document that contains their answers. For example "The ...
3
votes
1answer
6k views

Word: Resize Image by Percent - Macro

I routinely paste many screen captures into Microsoft Word 2007 and then have to manually resize them to around 75%, which becomes very tedious. The screen captures are all different sizes. I've ...
0
votes
1answer
208 views

How to create tables in word for each row in an excel sheet

I'm creating a word report and all my data is on an excel sheet. The sheet is like this: ID Name1 Name2 Name3 Name4 1 blah blah blah blah 2 blah blah blah blah 3 blah blah blah blah And ...
3
votes
2answers
2k views

Word macro: how to replace strings in a text, based on a 2 column-table?

So I have a series of strings that I'd like to search and replace in Word documents. My strings would be displayed as a two-column table. I'd probably create the table with Word, then would convert ...
2
votes
1answer
340 views

Macro Find: Is there a macro to Format a Word Document as if it were beign created in VBA?

I have a lots of code(for Excel) in Vba and would like to transfer a copy of it into a word document. Does anyone know of a macro that will format the word document to treat the code as if it were in ...
1
vote
0answers
254 views

Automate Conditional Template used in Word MailMerge

I have four different Word 2003 documents set up, all using the same Excel data source, but the documents have different logos, text, terms and columnar content layouts. Currently remLetter1.doc ...
4
votes
2answers
4k views

A thousand JPEG images in a Word document: how can I format them in the same way?

Please suppose you have a Microsoft Word 2007 document: you have just inserted in it about a thousand of JPEG images. With the first image, you do right-click, then FORMAT PICTURE, then option ...
0
votes
1answer
136 views

How to copy a file to network folder under OS X and Word 2004/2011

I am using Mac OS X. I have Word 2004 / Word 2011 on my Macs. I need to know how to create a text file under Word 2004/2011 and copy that file to my network share folder. I have to write a macro ...
6
votes
1answer
386 views

Word 2007 macro gone

I have programmed a little macro for text search in Word 2007. I tried to install it on other accounts in our company with very strange results. On two accounts it worked like it should. On other two ...
1
vote
1answer
523 views

Can I add shortcuts in Microsoft Word like `=lorem(x)`, `=rand(x)`, etc?

Can I add shortcuts in Microsoft Word like =lorem(12), =rand(34), etc? I'm not sure if these are somehow pulling from a stock VBA script (versus something Word-specific) or how to add more. The MS ...
1
vote
1answer
75 views

I need to duplicate a word file and name it based on an excel list or other list format

I have a base word file that I need to copy and name approximately 300 times. The content of the word file will be the same, but the file name will be different based on a column within excel (or a ...
-1
votes
3answers
8k views

Speech to text in Word 2007

How to enable Speech to Text in Microsoft Word 2007 ? I have found guides for text to speech but I am rather interested into speech to text.
1
vote
1answer
837 views

What would keep a Microsoft Word AutoNew() macro from running?

I'm using Microsoft Office 2003 and creating a bunch of template documents to standardize some tasks. I know it's standard practice to put the templates in an certain place Office expects to find ...