hi, is there anyway that i could make a file open with microsoft word from
vba (excel), its a .out file, it could be opened by changing its properties
(open with) to word, but could it be done through coding?, please help
Something like
Dim oWordApp As Word.Application
Dim oWordDoc As Word.Document
Set oWordApp = New Word.Application
oWordApp.Visible = True
Set oWordDoc = oWordApp.Documents.Open(Filename:=quot;filenamequot;)
'more code
Set oWordDoc = Nothing
oWordApp.Quit
Set oWordApp = Nothing
You will need to set a reference to the Microsoft Word library
(Toolsgt;References)
--
HTH
Bob Phillips
(remove nothere from email address if mailing direct)
quot;Jasonquot; gt; wrote in message
...
gt; hi, is there anyway that i could make a file open with microsoft word from
gt; vba (excel), its a .out file, it could be opened by changing its
properties
gt; (open with) to word, but could it be done through coding?, please help
cheers bob
quot;Bob Phillipsquot; wrote:
gt; Something like
gt;
gt; Dim oWordApp As Word.Application
gt; Dim oWordDoc As Word.Document
gt;
gt; Set oWordApp = New Word.Application
gt; oWordApp.Visible = True
gt; Set oWordDoc = oWordApp.Documents.Open(Filename:=quot;filenamequot;)
gt; 'more code
gt; Set oWordDoc = Nothing
gt; oWordApp.Quit
gt; Set oWordApp = Nothing
gt;
gt; You will need to set a reference to the Microsoft Word library
gt; (Toolsgt;References)
gt;
gt; --
gt; HTH
gt;
gt; Bob Phillips
gt;
gt; (remove nothere from email address if mailing direct)
gt;
gt; quot;Jasonquot; gt; wrote in message
gt; ...
gt; gt; hi, is there anyway that i could make a file open with microsoft word from
gt; gt; vba (excel), its a .out file, it could be opened by changing its
gt; properties
gt; gt; (open with) to word, but could it be done through coding?, please help
gt;
gt;
gt;
- Jul 25 Fri 2008 20:45
Properties of a document, help!
close
全站熱搜
留言列表
發表留言