Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have written the VBA to loop through a column on an Excel spreadsheet and
if the font description is "Script", I want to write the font name, the alphabet (formatted in the font), and some other detail to a Word Document. I have been able to create a new Word document, and I can save it and close it from the Excel VBA, but I can NOT figure out how to write the information described above to the Word document. I know Excel VBA, but (obviously), I don't know Word VBA. I am using version 2003 on Windows XP platform. I would really appreaciate any help you could provide. Thanks, Judy |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Judy,
see: http://word.mvps.org/faqs/interdev/c...wordfromxl.htm http://word.mvps.org/faqs/interdev/E...ateBinding.htm plus have a look at this one: Private Sub Test0000() Dim oWrd As Word.Application Dim oDcm As Word.Document Dim fntName As String fntName = activecell.Font.Name On Error Resume Next Set oWrd = GetObject(, "Word.application") If Err Then Set oWrd = New Word.Application End If oWrd.Visible = True Set oDcm = oWrd.Documents.Add oDcm.Range.InsertBefore "abcdefghi" & Chr(13) oDcm.Range.Paragraphs(1).Range.Font.Name = "Arial" ' ....... some more End Sub -- Greetings from Bavaria, Germany Helmut Weber, MVP WordVBA Win XP, Office 2003 "red.sys" & Chr$(64) & "t-online.de" |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Just what I needed to know -- thanks so much
"Helmut Weber" wrote: Hi Judy, see: http://word.mvps.org/faqs/interdev/c...wordfromxl.htm http://word.mvps.org/faqs/interdev/E...ateBinding.htm plus have a look at this one: Private Sub Test0000() Dim oWrd As Word.Application Dim oDcm As Word.Document Dim fntName As String fntName = activecell.Font.Name On Error Resume Next Set oWrd = GetObject(, "Word.application") If Err Then Set oWrd = New Word.Application End If oWrd.Visible = True Set oDcm = oWrd.Documents.Add oDcm.Range.InsertBefore "abcdefghi" & Chr(13) oDcm.Range.Paragraphs(1).Range.Font.Name = "Arial" ' ....... some more End Sub -- Greetings from Bavaria, Germany Helmut Weber, MVP WordVBA Win XP, Office 2003 "red.sys" & Chr$(64) & "t-online.de" |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How can I convert an Excel document to a Word Document | Setting up and Configuration of Excel | |||
change excel document into word document | Excel Discussion (Misc queries) | |||
convert excel document to word document (not a picture) | Excel Discussion (Misc queries) | |||
How do I convert a word document into a Excel document | Excel Discussion (Misc queries) | |||
How do I convert Word document into an Excel document? | Excel Discussion (Misc queries) |