Excel VBA button [closed]
Closed 2 days ago.
Insert page break in Word document using macro in Excel
I am trying to have my macro make three tables in Word. It currently makes one big table and formats it correctly, but I can’t find how to force a page break at the desired times. I found a macro that was using vba in Word and they used .InsertBreak but this keeps causing an error when I run it.
Macro in excel that creates 3 tables with page breaks at the end of each table in word over 3 documents. Need this on one document
I have a macro that takes three tables in Excel that are separated by a row of blank cells and produces three formatted tables in Word with page breaks after each table. At the moment it does this on three different documents but I need them to be all on the same one. Here is the code at present;
Copy range and format from excel and paste into new word doc
I need to have a button with a macro that copies a range of cells and their formatting/make it autofit width wise on an doc and pasted them into a new word document when the button is clicked.
VBA script to read an excel, write the values into a word file, then format values as Heading1, Heading2 etc
I am writing a macro that will read an excel table and write the values in the table into an excel file. I would like the macro to take the values from column A and format them to Heading1 style, and the values from column B and format them to Heading2 style, and finally the values from column C should be just Normal style.
VBA – Need to cretae multiple word docs
i’m hoping someone could help me change this code so that it creates word docs for every item in the data validation list. At the moment the code only creates one word doc at a time with manual list items selected. The list uses a source where I have pasted the list items in seperate cells in a single row. Im not sure how I can get VBA to loop through the list items and create the seperate word documents, where each item changes the cell data in the given table. Also, the list is located in a merged cell (B9:C9). Any help will be appreciated!
How to Replace Text at a Bookmark in Word with Formatted Text from an Excel Cell Using VBA
I’m working on a VBA script to copy a single cell from Excel and paste it into a Word document at a specific bookmark. I want to paste not just the text but also preserve the formatting of the cell. I’m using .PasteExcelTable
with the parameters False, False, True
to achieve this.
Excel VBA to find/replace text in Word Document (255 character limit)
I’m trying to open a Word document, and then do find/replace to replace text that is in square brackets []. But when I want to swap in a long sentence, I run against a character limit for “.Replacement.Text”.
VBA .cells recognizes value in some cells but not others
I’m trying to iterate through a list of values in excel to populate certain parts of a word document. The VBA script finds the strings listed in the arrays declared at the top (“revArrayY1”, etc) and replaces that text with corresponding values in a spreadsheet using the .Cells function to grab the value. It worked at first, but when adding another row to the list of values in excel to populate, the .Cells function won’t recognize the value in the new cell. All I did was shift the cells in excel up to make room for the new row and add a new string to the array.
Excel VBA to Word string replacement
I have a code snippet that pulls the data from my Excel workbook into an array and then populates the list within a Word document. There are multiple lists within the document and each has a unique placeholder. The code runs perfectly well for 5 out of 6 lists, but for some reason mashes all arrays together into the 2nd list. A snippet of the code below: