Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am starting in Excel 2000, going to an ftp site, copying information from
theftp site, want to paste as rft into Word to allow for a find of a filename, selection of the link to a file, copy that to a variable and pass the address into a cell back in excel. I can not seem to be able to get the pastespecial to function in the open document in word. Any suggestions would be appreciated. Thanks = Ed |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I don't believe Word uses pastespecial. you may just try the paste function
"els" wrote: I am starting in Excel 2000, going to an ftp site, copying information from theftp site, want to paste as rft into Word to allow for a find of a filename, selection of the link to a file, copy that to a variable and pass the address into a cell back in excel. I can not seem to be able to get the pastespecial to function in the open document in word. Any suggestions would be appreciated. Thanks = Ed |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
JNW,
WOrd 2000 does support Paste Special but i jsut can not seem to get the word methods to work from Excel. Can yio give me any ideas? Thansk = Ed "JNW" wrote: I don't believe Word uses pastespecial. you may just try the paste function "els" wrote: I am starting in Excel 2000, going to an ftp site, copying information from theftp site, want to paste as rft into Word to allow for a find of a filename, selection of the link to a file, copy that to a variable and pass the address into a cell back in excel. I can not seem to be able to get the pastespecial to function in the open document in word. Any suggestions would be appreciated. Thanks = Ed |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Always learning with office products! Thanks for the heads up.
After some research (had to pull out the old dummies book) I've come up with a very simple example below. I've never worked with word through excel so it was a good learning experience for me. This example just copies a range in excel to word as an RTF (open vba for word and see the wordvba help file for pastespecial to see more data types). Some things to note: -On the line that contains ".Range.PasteSpecial DataType:=wdPasteRTF" Whatever is after the 'DataType:=' needs to be defined as a variant. -PasteSpecial is set up different than in excel. As below you use selection.range.pastespecial in word as opposed to just selection.pastespecial in excel. Sub MakeWordDoc() Dim WordApp As Object Dim message As String Dim SaveAsName As String Dim wdPasteRTF As Variant Dim MyPath As String Range("A1:E9").Copy MyPath = "C:\" Set WordApp = CreateObject("Word.Application") SaveAsName = MyPath & "Test" With WordApp .Documents.Add With .Selection .Range.PasteSpecial DataType:=wdPasteRTF End With .ActiveDocument.SaveAs FileName:=SaveAsName End With WordApp.Quit Set WordApp = Nothing MsgBox "memo was created" End Sub I hope that helps. If not, try posting what you have and we'll try tweaking it. "els" wrote: JNW, WOrd 2000 does support Paste Special but i jsut can not seem to get the word methods to work from Excel. Can yio give me any ideas? Thansk = Ed "JNW" wrote: I don't believe Word uses pastespecial. you may just try the paste function "els" wrote: I am starting in Excel 2000, going to an ftp site, copying information from theftp site, want to paste as rft into Word to allow for a find of a filename, selection of the link to a file, copy that to a variable and pass the address into a cell back in excel. I can not seem to be able to get the pastespecial to function in the open document in word. Any suggestions would be appreciated. Thanks = Ed |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Why does Selection.PasteSpecial toggle Application.ScreenUpdating | Excel Worksheet Functions | |||
Replace application.RTD property by Application.RTDServers collect | Excel Programming | |||
macro to close excel application other than application.quit | Excel Programming | |||
pastespecial | Excel Programming | |||
Making VB PasteSpecial method to work the same as Excels Application | Excel Programming |