ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   A Challenge (Linking word and Excel) (https://www.excelbanter.com/excel-programming/335404-challenge-linking-word-excel.html)

Mr M Walker[_2_]

A Challenge (Linking word and Excel)
 

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

moi

A Challenge (Linking word and Excel)
 
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



"Mr M Walker" schreef in bericht
...

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





All times are GMT +1. The time now is 08:50 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com