PDA

View Full Version : Export excel cells to word with and defining heading1,2 and fontbolt and normal



Reiniervdijk
04-29-2020, 08:11 AM
Hi there,

My excel VBA experience is not much however I want to try something but can't work it out on my own.

I have a product list that will be different every time.
The list will take with it different cells to fill in different columns as well.

So this is the thing, I want a macro that opens Word and does the following;
Column A; check if the text is font bold or Normal.

Font bold cell will be paste as Heading 1
Newline
Normal cell - will be paste as Heading 2
etc. etc. till the end of the list in column A

Then there is subject in x columns (subject from normal text to bold in the word file)
And then there is text in the cell crossing Name and Subject. (Cell text normal to normal in the Word file.

If the specific cell is empty then the Subject should not be transferred to Word.

See the pictures in this post for more information.
Excel26496 Word26495

Second is actually when there is this >[cell] = ([1,1]) = ([r,c]) in a text cell.
Then print this in the Word document as the actual referredtext.
Example
excel file; text text text [1,1] text text
word file; text text text example text text

Helping me with this will help me very much. Thank you26497

macropod
04-29-2020, 03:24 PM
This thread is a duplicate of: http://www.vbaexpress.com/forum/showthread.php?67247-Text-to-Word-document-in-headers
Kindly don't post questions about the same topic in multiple threads.
Thread closed. You may continue the discussion in your other thread.