How to convert a word document to excel without losing formatting

JTH94BT

New Member
Joined
Jul 11, 2024
Messages
7
Office Version
  1. 365
Platform
  1. Windows
I have a large word document that I need to convert to excel so that I can add formula and checks, however the document is very large and has very specific formatting as the document will be converted to PDF and uploaded to a website. I've tried simply copy and pasting the word pages in to excel but this seems messy and is quite time consuming considering the word doc is over 250 pages long. Can anyone help?
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
Convert a Word document into an Excel spreadsheet? I imagine it is very messy, because a page and spreadsheet are wildly different constructs - I can't even visualise what that should even look like.

What are you actually trying to do? When you say "so that I can add formula and checks" what does that mean? Like, an equation?
1724750516908.png
 
Upvote 0

Convert a Word document into an Excel spreadsheet? I imagine it is very messy, because a page and spreadsheet are wildly different constructs - I can't even visualise what that should even look like.

What are you actually trying to do? When you say "so that I can add formula and checks" what does that mean? Like, an equation?
View attachment 115994
Essentially, the word document is a pricing document with pages full of text and / or pricing tables throughout. This word document is updated during the year with new pricing, it is then converted to PDF before being uploaded to a website. The reason for wanting to convert to excel is to give myself the ability to add some formula to the pricing updates that are made throughout the year and automate these updates where possible.

Other than physically copy and pasting the information from word to excel, is there another way? I think at this stage my only solution is to copy, paste and format manually.
 
Upvote 0
I'm still not understanding.

If the issue is:
  1. the formatting of final document (and how "messy" it is); and,
  2. the word document comprises "pages full of text"; and,
  3. all you are doing is populating that text with figures calculated in Excel - namely, to give you the "ability to add some formula to the pricing updates that are made throughout the year and automate these updates where possible"
why are you not just taking the calculated figures from Excel and putting them into the Word document?

I must be missing something obvious. Long story shot - I'd really advise against copying and pasting a word document into Excel. I've never heard of such a thing. Tables - maybe, but not actual text.
 
Upvote 0
I'm still not understanding.

If the issue is:
  1. the formatting of final document (and how "messy" it is); and,
  2. the word document comprises "pages full of text"; and,
  3. all you are doing is populating that text with figures calculated in Excel - namely, to give you the "ability to add some formula to the pricing updates that are made throughout the year and automate these updates where possible"
why are you not just taking the calculated figures from Excel and putting them into the Word document?

I must be missing something obvious. Long story shot - I'd really advise against copying and pasting a word document into Excel. I've never heard of such a thing. Tables - maybe, but not actual text.
I understand it's difficult to visualise what I'm trying to achieve here without showing you the actual documents. Currently I have to go through each page of the word document and calculate the new figures manually and then input the new figure in to the word document before converting the word document in to PDF which is then uploaded to our website. What I want to do is hold the entire document in excel, with each tab representing a page of the word document where I can add calculation steps to automate the price updates and then convert the excel doc in to PDF which is then uploaded to our website. I have experimented with simply copy and pasting each page of the word document in to excel, but in doing so, the formatting goes funny, however I think there is no easy solution to copying all of the data from word in to excel whilst maintaining the formatting. By holding this information in excel, it allows me to automate pricing updates throughout the document whilst reducing the risk of human error. Thanks for your response, however I think I have a tedious job of copy, pasting and formatting manually ahead of me.
 
Upvote 0
I understand it's difficult to visualise what I'm trying to achieve here without showing you the actual documents. Currently I have to go through each page of the word document and calculate the new figures manually and then input the new figure in to the word document before converting the word document in to PDF which is then uploaded to our website. What I want to do is hold the entire document in excel, with each tab representing a page of the word document where I can add calculation steps to automate the price updates and then convert the excel doc in to PDF which is then uploaded to our website. I have experimented with simply copy and pasting each page of the word document in to excel, but in doing so, the formatting goes funny, however I think there is no easy solution to copying all of the data from word in to excel whilst maintaining the formatting. By holding this information in excel, it allows me to automate pricing updates throughout the document whilst reducing the risk of human error. Thanks for your response, however I think I have a tedious job of copy, pasting and formatting manually ahead of me.
You don't need to convert the word document (or pages thereof) into a spreadsheet in order to get access to the content of that word document. You can control Word from Excel.

For example, the following script - running from Excel - will create an instance of Word, open up designated word document, extract the text from that word document, and deposit at most the first 1000 characters of that text in to the Activecell.

VBA Code:
Sub ExcelControlsWord()

    Dim WordApplication As Object
    Set WordApplication = CreateObject("Word.Application")
    
    Dim Filename As String
    Filename = "C:\PATHTOMYFILE\MyFileName.docx"
    
    Dim WordDocument As Object
    Set WordDocument = WordApplication.Documents.Open(Filename)
    
    Dim TargetRange As Object
    Set TargetRange = WordDocument.Range
    
    Dim FullText As String
    FullText = TargetRange.Text
    
    ActiveCell.Value = Left(FullText, 1000)
    
    WordDocument.Close
    
    WordApplication.Quit
    
    Set WordApplication = Nothing

End Sub

It's a pretty basic example, but the point is that you can control Word, from Excel, to parse the text of the document without having to convert it into some kind of spreadsheet; complete your calculations etc; put the values back into the nicely formatted word document, and then convert that to a PDF. I hope that makes sense.
 
Upvote 0
You don't need to convert the word document (or pages thereof) into a spreadsheet in order to get access to the content of that word document. You can control Word from Excel.

For example, the following script - running from Excel - will create an instance of Word, open up designated word document, extract the text from that word document, and deposit at most the first 1000 characters of that text in to the Activecell.

VBA Code:
Sub ExcelControlsWord()

    Dim WordApplication As Object
    Set WordApplication = CreateObject("Word.Application")
   
    Dim Filename As String
    Filename = "C:\PATHTOMYFILE\MyFileName.docx"
   
    Dim WordDocument As Object
    Set WordDocument = WordApplication.Documents.Open(Filename)
   
    Dim TargetRange As Object
    Set TargetRange = WordDocument.Range
   
    Dim FullText As String
    FullText = TargetRange.Text
   
    ActiveCell.Value = Left(FullText, 1000)
   
    WordDocument.Close
   
    WordApplication.Quit
   
    Set WordApplication = Nothing

End Sub

It's a pretty basic example, but the point is that you can control Word, from Excel, to parse the text of the document without having to convert it into some kind of spreadsheet; complete your calculations etc; put the values back into the nicely formatted word document, and then convert that to a PDF. I hope that makes sense.
Thank you Dan I will give this a shot!
 
Upvote 0
A small acknowledgement of my suggestion, even if it's useless, would have been nice...:censored:
 
Upvote 0

Forum statistics

Threads
1,221,310
Messages
6,159,176
Members
451,543
Latest member
cesymcox

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top