تقييم الموضوع :
  • 0 أصوات - بمعدل 0
  • 1
  • 2
  • 3
  • 4
  • 5
[vb6.0] يا رب حد يرد على طلبي كود حفظ ملف ....................
#5
أهلا أخي الكريم , هذا تعديل الكود :

كود :
Dim MonWd As New Word.Application
Dim wmonwd As New Word.Document
MonWd.Visible = True
Set wmonwd = MonWd.Documents.Open(App.Path & "\Tests\" & (ComboTests.Text) & ".doc", , False)
With wmonwd
'======--------------------=============------------==============
'-----------------main table----------------
    .FormFields("W_code").Range = txtCode.Text
    .FormFields("W_name").Range = txtname.Text
    .FormFields("W_doc").Range = txtDoc.Text
    .FormFields("W_age").Range = txtage.Text + ", " + txtGender.Text
    .FormFields("W_samD").Range = txtSamDate.Text
    .FormFields("W_resD").Range = txtResDate.Text
'-----------------Result table----------------
    .FormFields("W_txtT17").Range = "Dr. " + lblUsername.Caption
    .FormFields("W_txtT1").Range = txtT1.Text
    .FormFields("W_txtT2").Range = txtT2.Text
    .FormFields("W_txtT3").Range = txtT3.Text
    .FormFields("W_txtT4").Range = txtT4.Text
    .FormFields("W_txtT5").Range = txtT5.Text
    .FormFields("W_txtT6").Range = txtT6.Text
    .FormFields("W_txtT7").Range = txtT7.Text
    .FormFields("W_txtT8").Range = txtT8.Text
    .FormFields("W_txtT9").Range = txtT9.Text
    .FormFields("W_txtT10").Range = txtT10.Text
    .FormFields("W_txtT11").Range = txtT11.Text
    .FormFields("W_txtT12").Range = txtT12.Text
    .FormFields("W_txtT13").Range = txtT13.Text
    .FormFields("W_txtT14").Range = txtT14.Text
    .FormFields("W_txtT15").Range = txtT15.Text
    .FormFields("W_txtT24").Range = txtT24.Text

    .SaveAs FileName:=App.Path & "\Tests\" & Trim$(ComboTests.Text) & Trim$(txtCode.Text) & ".doc"

'======--------------------=============------------==============
End With

Set wmonwd = Nothing
Set MonWd = Nothing
الرد }}}
تم الشكر بواسطة: أبو عمر , vb6_coder , hamada salah90


الردود في هذا الموضوع
RE: يا رب حد يرد على طلبي كود حفظ ملف .................... - بواسطة Ahmed_Mansoor - 15-10-15, 02:43 AM

المواضيع المحتمل أن تكون متشابهة .
الموضوع : الكاتب الردود : المشاهدات : آخر رد
  [سؤال] * طلبي بسيط جدا لم له خلفية فالاستعلام (الفلترة) جزاكم الله الجنة sniper-jawadino 3 2,848 02-04-14, 11:11 PM
آخر رد: sniper-jawadino

التنقل السريع :


يقوم بقرائة الموضوع: