Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
els els is offline
external usenet poster
 
Posts: 7
Default Across application pastespecial

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   Report Post  
Posted to microsoft.public.excel.programming
JNW JNW is offline
external usenet poster
 
Posts: 480
Default Across application pastespecial

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   Report Post  
Posted to microsoft.public.excel.programming
els els is offline
external usenet poster
 
Posts: 7
Default Across application pastespecial

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   Report Post  
Posted to microsoft.public.excel.programming
JNW JNW is offline
external usenet poster
 
Posts: 480
Default Across application pastespecial

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why does Selection.PasteSpecial toggle Application.ScreenUpdating OssieMac Excel Worksheet Functions 2 August 4th 09 12:05 AM
Replace application.RTD property by Application.RTDServers collect John.Greenan Excel Programming 1 July 7th 05 02:05 PM
macro to close excel application other than application.quit mary Excel Programming 1 September 14th 04 03:43 PM
pastespecial Claude Excel Programming 2 February 24th 04 01:21 PM
Making VB PasteSpecial method to work the same as Excels Application John[_35_] Excel Programming 1 July 10th 03 05:20 PM


All times are GMT +1. The time now is 10:16 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"