Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7752525
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T11:49:22+00:00 2026-06-01T11:49:22+00:00

I have this excel file which I have been able to write the data

  • 0

I have this excel file which I have been able to write the data into a Word document through vba for a report. The VBA code is within the excel file containing the data.

I already have most of the code done and it is working properly, but I can not figure out how to tell word (through the vba code in excel) to change the paragraph spacing. Any advice?

I am using the following code to write into word from excel(not the full code just an example):

Dim wdApp As Word.Application
Dim wdDoc As Word.Document
Set wdApp = New Word.Application
Set wdDoc = wdApp.Documents.Add
wdDoc.Content.InsertAfter "Test"
wdDoc.Content.InsertParagraphAfter
wdDoc.SaveAs (file & "\SpecificReport_" & filter & ".doc")
wdDoc.Close
wdApp.Quit
Set wdDoc = Nothing
Set wdApp = Nothing
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T11:49:23+00:00Added an answer on June 1, 2026 at 11:49 am

    Recommendation, but not specific answer. If you have any trouble figuring out how to do something from Excel with Word, i find that recording actions in word and reviewing the code generated usually answers that for me.

    In this specific instance I came up with the following lines of code:

    wdDoc.Content.ParagraphFormat.SpaceBefore = 6
    wdDoc.Content.ParagraphFormat.SpaceBeforeAuto = False

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an excel file in which there are 10 columns with the data
I have an excel file which contains 400 sheets. How can I load this
I have an excel file which I've been supplied a layout for with the
I have the this code that will create excel file and work sheet then
I have a fairly large Excel file. In this file there is a column
I Have an Excel 2003 file with a line similar to this: I need
I have an Excel Spreadsheet like this id | data for id | more
I have a formula like this which works fine on Excel/OOCalc applications: =SUMPRODUCT(--($Panels.$A$5:$A$6999=K$80);--($Panels.$B$5:$B$6999=K$81);INDEX($Panels.$C$5:$J$6999;0;MATCH(Voc;$Panels.$C$3:$J$3;0))) Since
I need to make an excel file which would fetch data from connection to
I have a data.frame in R which has been constructed off the Example 1-3

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.