Help With Passing Bold Formatting Through String Into Word

IcePirates's Avatar, Join Date: Jan 2009
Newbie Member
Hello,

My question is VBA/Excel related...

I have an excel sheet, in that excel sheet is a command button, once clicked the command button creates a Word document.

Im trying to get my VBA script to bold certain text that will be in the word document. But all my attempts to bold certain cell contents have failed.
Im not getting any errors from the editor, its just not bolding certain text Ive told it too when the word document gets created.

I have included an attachment (And Ive tried the following methods already)

1. ActiveCell.Font.Bold & "This Is Function One, This Text Will Appear Bold" & wks.Cells(ActiveCell.Row, 2) & _

2. "This is Function Two, This Text Will Appear Bold" & wks.Cells(ActiveCell.Row, 2).Font.Bold

3. "This is Function Three, This Text Will Appear Bold" & wks.Cells(ActiveCell.Row, 2) & (ActiveCell.Font.Bold) & _

Last edited by shabbir; 28Jan2009 at 20:33.. Reason: Attachment Removed
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
Please try explaining in post rather than attaching the complete problem.
IcePirates's Avatar, Join Date: Jan 2009
Newbie Member
The issue arrises, when a user clicks on the command button inside the .xls to create the word document...Whats happening is, Im trying to tell certain lines to bold when the word document gets created, such as: (in the Excel sheet, Module 1, you will find)

"Sale File #: " & wks.Cells(ActiveCell.Row, 9) & vbNewLine & _

I change that to something like
"Sale File #: " & wks.Cells(ActiveCell.Row, 9) & (ActiveCell.Row.Font.Bold) & vbNewLine & _


Thereby when the macro is excuted inside the .xls sheet it should make the text "Sale File #" bold in the word document...

However - Im not getting any errors when changing the VBA, the problem arrises when the Word Document gets created, because the particular text I want bold, is not bolding in the word document...

Does that make a bit more sense?
Let me know if it doesn't, I can explain some more.