Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming,microsoft.public.word.vba.beginners
|
|||
|
|||
passing variables from excel to word
If I want to open word from excel using automation like this, is there
any way I can pass two variables across - the only way I can think of at the moment is to use a file in between with the values in! Sub OpenWord() Dim oDoc As Word.Document Dim oWord As Word.Application 'See if word's already running On Error Resume Next Set oWord = GetObject(, "Word.Application") If Err Then 'No, so start a new word session Set oWord = New Word.Application Err.Clear End If oWord.Visible = True oWord.Activate Set oDoc = oWord.Documents.Open(ThisWorkbook.Path & "\Envelope.doc") -- Mike |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
VBA - passing Variables to subroutines | Excel Discussion (Misc queries) | |||
Passing Variables | Excel Discussion (Misc queries) | |||
VBA passing variables through a function | Excel Discussion (Misc queries) | |||
Passing variables between a form and macro | New Users to Excel | |||
Passing variables between a form and macro | New Users to Excel |