I used this solution to open Word-
Sub OpenWord()
MyAppId = Shell("WINWORD.EXE
C:\temp\WordExample\file1.doc", _
vbMaximizedFocus)
End Sub
Is there a way to automatically paste the copied Excel
camera pic into the Word doc?
thanks!
Thanks!
This not a proper way to open a word application because
u do not get an handle to the objects.
I have written the code for opening a new Word Document
and pasting the Excel data into it.
Before running the code, goto Tools>>References in your
VBA Editor of MS Excel and add a reference to 'Microsoft
Word Object Library'
the code --->
Sub PasteAsPic()
Dim WrdApp As New Word.Application
Dim wrdDoc As New Word.Document
'copy the required data from the Excel File
ThisWorkbook.Sheets(1).Range("B2:D10").Copy
' Create a new Word Document
Set wrdDoc = WrdApp.Documents.Add
(DocumentType:=wdNewBlankDocument)
WrdApp.Visible = True
'Paste the copied data as Picture
WrdApp.Selection.PasteSpecial Placement:=wdInLine,
DataType:=wdPasteBitmap
'save the new Word Document
wrdDoc.SaveAs "c:\Filename.doc", wdWord
'clean up code
wrdDoc.Close
Set wrdDoc = Nothing
Set WrdApp = Nothing
End Sub
HTH,
Regards,
Salonee Sawant
Business Productivity Analyst
Maestros Mediline Systems Ltd.
India.
in...@maestros.net
>.
>
I want to distribute this spreadsheet once it is finished
to our sales team. Is there a way to programically
perform the 'Microsoft Word Object Library' References for
the user?
thanks again
Original Message-----
>.
>