Excelde A:F sütunlarını worde kopyalama

Katılım
2 Mart 2005
Mesajlar
2,960
Excel Vers. ve Dili
ev: Ofis 2007- Win Xp
iş: Ofis 2010- Win Vista
Excel tablomdaki A1:F100 sütunlarını makro ile worde kopyalamak mümkünmüdür.
 

isfa5878

Banned
Katılım
15 Kasım 2007
Mesajlar
117
Excel Vers. ve Dili
excel 2003
Sub ()
fName = Application.InputBox("Dosya ismi girin...", "Dosya")
If fName <> 0 Then
ActiveSheet.Name = fName
Range("A1:F100").Copy
Set objword = CreateObject("Word.Application")
objword.Visible = True
Set MyDoc = objword.Documents.Add(DocumentType:=wdNewBlankDocu ment)
objword.Selection.PasteSpecial Link:=False, DataType:=10
objword.activedocument.SaveAs "C:\" & fName & ".doc"
End If
End Sub

sn.haluk tan al&#305;nt&#305;d&#305;r.
 
Katılım
2 Mart 2005
Mesajlar
2,960
Excel Vers. ve Dili
ev: Ofis 2007- Win Xp
iş: Ofis 2010- Win Vista
Set MyDoc = objword.Documents.Add(DocumentType:=wdNewBlankDocument)

sat&#305;r&#305;nda hata veriyor. du oldu
 
Katılım
2 Mart 2005
Mesajlar
2,960
Excel Vers. ve Dili
ev: Ofis 2007- Win Xp
iş: Ofis 2010- Win Vista
Alakan&#305;z i&#231;in te&#351;ekk&#252;r ederim hocam argumanlardan birinde bo&#351;luk varm&#305;&#351; ilk kodun onun i&#231;in &#231;al&#305;&#351;mam&#305;&#351;
Kodlardaki fark&#305;da yazay&#305;m iliglenen arkada&#351;lar olabilir

Kenarl&#305;klar&#305;da kopyalar
Kod:
Sub WrdKopya()
Dim objword As Object
fName = Application.InputBox("Dosya ismi girin...", "Dosya")
'If fName <> 0 Then
'ActiveSheet.Name = fName
Range("A1:F100").Copy
Set objword = CreateObject("Word.Application")
objword.Visible = True
Set Mydoc = objword.Documents.Add(DocumentType:=wdNewBlankDocument)
objword.Selection.PasteSpecial Link:=False, [B]DataType:=10[/B]
objword.activedocument.SaveAs "C:\" & fName & ".doc"
'End If
End Sub


Kenarl&#305;klar&#305; kopyalamaz, birle&#351;tirlmi&#351; h&#252;creleri ba&#351;a ta&#351;&#305;r.
Kod:
Sub wRDkOPYA2()

Range("A1:E25").Copy
Set objword = CreateObject("Word.Application")
objword.Visible = True
objword.Documents.Add DocumentType:=wdNewBlankDocument
objword.Selection.PasteSpecial Link:=False, DataType:=20
End Sub
 
Katılım
2 Mart 2005
Mesajlar
2,960
Excel Vers. ve Dili
ev: Ofis 2007- Win Xp
iş: Ofis 2010- Win Vista
........................
http://www.excel.web.tr/showthread.php?p=219704#post219704
sorunun yeni katagoriye girdi&#287;ini d&#252;&#351;&#252;nd&#252;&#287;&#252;mden di&#287;er &#252;yelerin ula&#351;&#305;m kolayl&#305;&#287;&#305; i&#231;in yeni ba&#351;l&#305;&#287;a ta&#351;&#305;d&#305;m.
 
Son düzenleme:
Üst