İyinet - Webmaster Forumu

Geri Dön   İyinet - Webmaster Forumu > Programlama > ASP .NET > ASP Hazır Kodlar ve ASP Kütüphaneleri

ASP Hazır Kodlar ve ASP Kütüphaneleri ASP Hazır Kodlar / ASP Kütüphane

User Tag List

Cevapla
 
LinkBack Seçenekler
  #1 (permalink)  
Alt 9.03.2008, 00:12
SametE - ait Kullanıcı Resmi (Avatar)
Üye
 
Üyelik tarihi: 7.03.2008
Nereden: Balıkesir
Mesajlar: 154
Standart Asp ile word dosyası oluşturma ve kaydetme

Kod:
Set objWord = CreateObject("Word.Application")
objWord.Caption = "Test Caption"
objWord.Visible = True

Set objDoc = objWord.Documents.Add()
Set objSelection = objWord.Selection

objSelection.Font.Name = "Arial"
objSelection.Font.Size = "18"
objSelection.TypeText "Network Adapter Report"
objSelection.TypeParagraph()

objSelection.Font.Size = "14"
objSelection.TypeText "" & Date()
objSelection.TypeParagraph()
objSelection.TypeParagraph()

objSelection.Font.Size = "10"

strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery _
    ("Select * from Win32_NetworkAdapterConfiguration")

For Each objItem in colItems

    objSelection.Font.Bold = True
    objSelection.TypeText "ARP Always Source Route: " 
    objSelection.Font.Bold = False
    objSelection.TypeText "" & objItem.ArpAlwaysSourceRoute
    objSelection.TypeParagraph()

    objSelection.Font.Bold = True
    objSelection.TypeText "ARP Use EtherSNAP: "
    objSelection.Font.Bold = False
    objSelection.TypeText ""  & objItem.ArpUseEtherSNAP
    objSelection.TypeParagraph()

    objSelection.Font.Bold = True
    objSelection.TypeText "Caption: "
    objSelection.Font.Bold = False
    objSelection.TypeText ""  & objItem.Caption
    objSelection.TypeParagraph()

    objSelection.Font.Bold = True
    objSelection.TypeText "Database Path: "
    objSelection.Font.Bold = False
    objSelection.TypeText ""   & objItem.DatabasePath
    objSelection.TypeParagraph()

    objSelection.Font.Bold = True
    objSelection.TypeText "Dead GW Detection Enabled: "
    objSelection.Font.Bold = False
    objSelection.TypeText ""   & objItem.DeadGWDetectEnabled
    objSelection.TypeParagraph()

    objSelection.Font.Bold = True
    objSelection.TypeText "Default IP Gateway: " 
    objSelection.Font.Bold = False
    objSelection.TypeText "" & objItem.DefaultIPGateway
    objSelection.TypeParagraph()

    objSelection.Font.Bold = True
    objSelection.TypeText "Default TOS: "
    objSelection.Font.Bold = False
    objSelection.TypeText ""  & objItem.DefaultTOS
    objSelection.TypeParagraph()

    objSelection.Font.Bold = True
    objSelection.TypeText "Default TTL: "
    objSelection.Font.Bold = False
    objSelection.TypeText ""  & objItem.DefaultTTL
    objSelection.TypeParagraph()

    objSelection.Font.Bold = True
    objSelection.TypeText "Description: "
    objSelection.Font.Bold = True
    objSelection.Font.Bold = False
    objSelection.TypeText ""  & objItem.Description
    objSelection.TypeParagraph()

    objSelection.TypeParagraph()

Next

objDoc.SaveAs("C:\Scripts\Word\testdoc.doc")
objWord.Quit

Burada C:scripts\Word klasörünün içine testdoc.doc diye kaydedilmiş isterseniz siz bunu değiştrebilirsiniz.
Alıntı ile Cevapla
Cevapla

Bu Konuyu Paylaşın !

Etiketler
asp , dosyasi , ile , kaydetme , olusturma , ve , word


Şu an bu konuyu okuyan kişi sayısı: 1 (0 üye ve 1 misafir)
 
Seçenekler

Yetkileriniz
Konu Acma Yetkiniz Yok
Cevap Yazma Yetkiniz Yok
Eklenti Yükleme Yetkiniz Yok
Mesajınızı Değiştirme Yetkiniz Yok

BB code is Açık
Smileler Açık
[IMG] Kodları Açık
HTML-Kodu Kapalı
Trackbacks are Açık
Pingbacks are Açık
Refbacks are Açık



Forum Saati: 00:56. Zaman dilimi GMT +3 olarak ayarlanmıştır.


Powered by vBulletin™ Version 3.8.7
Copyright © 2018 vBulletin Solutions, Inc. All rights reserved.
Content Relevant URLs by vBSEO