Excel macro
But when running sometimes Runtime 5 flies, or it starts word creates a document but +- with 30 lines starts by two lines on a sheet to add for an unforgettable reason.
Sub CopyColumnToWord()
WordApp as Object
WordDoc as Object
Dim LastRow As Long
Dim ws as worksheet
Dim Cell as Range
Create a new copy of Word
Set WordApp = CreateObject (“Word.Application”)
Create a new document in Word
Set WordDoc = WordApp.Documents.Add
WordApp.Visible = True
' We show the Excel sheet from which we will copy the data
Set ws = ThisWorkbook.Sheets("List1") ' Change the name of your list if necessary
' Determine the last line in column A
LastRow = ws.Cells(ws.Rows.Count, “A”).End(xlUp).Row
Copy data from column A to Word
For Each Cell In ws.Range("A1:A" and LastRow)
WordDoc.Content.InsertAfter Cell.Value & vbCrLf
The next cell
Cleaning the variable
Set WordDoc = Nothing
Set WordApp = Nothing
Set Cell = Nothing
The End Sub
Maybe it's a matter of some settings, I need to solve this task.You can use this macro you can other without the difference would only work.
-
888 18 2 1 Hello to you!
Interested in your project. Please contact me to discuss the details and deadlines of the project.
There is such a macro that fully corresponds to TZ.
-
5928 345 0 I will review the issue of transferring data from Excel to Word to Mac.
First, specify which Excel and Word are used.
-
221 6 1 The deadline is not specified from the moment of acceptance of the conditions, but from the moment of the appearance of electricity I have as an executor (a programmist without electricity can only shrink, so the text is below)
The error is associated with the incorrect call of the function (from the announcement of the transferred parameters or the error of opening/creating the document but then the call of the function without verifying the success). Well, this is a guarantee question for a couple of hours to the person who wrote the code with a description of when exactly (with what actions or in what situation) this error occurs.
-
543 19 2 Good day, ready to repair your macro or create a completely new. I have repeatedly written macros for Excel files.
I will wait for answers.
-
Не будет на маке корректно работать, проблема с word.application, это не исправить, я думаю.
-
Вы рассматриваете вариант например с пдф вместо ворд?
-
Current freelance projects in the category Desktop Apps
Development of custom software (Android application + CMS) for SUNMI K2 self-service kiosks (Fast food)
23 USD
We are looking for an experienced team or a Middle/Senior Android developer (possibly with Full-stack skills) to create proprietary software for self-service kiosks for a fast food retail chain. Currently, our terminals operate on a ready-made cloud integrator, but we are… Content Management Systems, Desktop Apps ∙ 4 days 19 hours back ∙ 20 proposals |
It is necessary to migrate the current working program from FoxPro to C#.Hello everyone! We have a program in FoxPro (it has several modules, it's an accounting program), we have the source code of the program, and if necessary, we can consult with people who support the current program. What needs to be done: 1. Analyze how everything works,… C#, Desktop Apps ∙ 10 days 3 hours back ∙ 19 proposals |
About the Master Program "KONSTRUCTOR"
4192 USD
We are looking for a very experienced C++ developer to modernize existing software (master program). The program is responsible for creating derivative software representing audio-visual sessions of psychological correction. The current version is written in pure WinAPI (Visual… C & C++, Desktop Apps ∙ 12 days 16 hours back ∙ 20 proposals |
ODOO Enterprise setup for constructionНеобхідно побудувати картки та налаштувати зручний імпорт, інтеграцію з ЕДО і загалом Workflow ODOO Компанія займається системною інтеграцією: маємо поставки обладнання В2В або з прямою маржинальністю, або з рібейтами в подальшому. Крім того, ведемо будівельні роботи на об'єктах… Enterprise Resource Planning (ERP), Desktop Apps ∙ 13 days 1 hour back ∙ 7 proposals |