A Challenge (Linking word and Excel)

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I think this question is going to need a VBA Wizard

Is it possible to link for MS Excel to Word ?

if so I am trying to open a MS Word doc whilst in a userform in Excel

The document I want to open is held in a text box within the userform

How could this be done ?
Regards

Marcus
MArcus
 
What if you add a RichTextBox to the form instead of a normal TextBox?
The thing below seems to work quite okay...


Private Sub GetWordDoc()
Dim wDoc As Object
Dim wFileName As Variant
wFileName = Application.GetOpenFilename("MS Word Documents
(*.doc),*.doc", , "Pick a Word Doc")
Set wDoc = GetObject(wFileName)
RichTextBox1.OLEObjects.Add , , wFileName
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top