منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب
[vb6.0] طلب : كيفية استيراد بيانات من الأوفيس وورد وعرضها في مربعات نص بالفيجول بيسك - نسخة قابلة للطباعة

+- منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب (http://vb4arb.com/vb)
+-- قسم : قسم لغات البرمجة الاخرى (http://vb4arb.com/vb/forumdisplay.php?fid=4)
+--- قسم : قسم لغة vb6.0 (http://vb4arb.com/vb/forumdisplay.php?fid=18)
+--- الموضوع : [vb6.0] طلب : كيفية استيراد بيانات من الأوفيس وورد وعرضها في مربعات نص بالفيجول بيسك (/showthread.php?tid=13626)



طلب : كيفية استيراد بيانات من الأوفيس وورد وعرضها في مربعات نص بالفيجول بيسك - hamada salah90 - 27-10-15

اخواني الأعزاء بعد التحية

أريد كود لإستيراد البيانات الموجودة في جدول من الوورد office word 2003

وعرض هذه البيانات في مربعات نص في الفيجول بيسك

وهذا مثال مرفق للتعديل عليه 


Smile

ملاحظة هامة !!

أنا لدي هذا الكود لإستيراد البيانات من الفيجول وعرضها في الوورد

أريد كود مشابه لنفس هذا الكود لو سمحتم
كود :
Static MonWd As Word.Application
Static wmonwd As Word.Document
Set MonWd = New Word.Application
MonWd.Visible = True
Set wmonwd = MonWd.Documents.Open(App.Path & "\Tests\" & (ComboTests.Text) & ".doc")
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 MonWd = Nothing
Set wmonwd = Nothing



RE: طلب : كيفية استيراد بيانات من الأوفيس وورد وعرضها في مربعات نص بالفيجول بيسك - hamada salah90 - 27-10-15

إخواني الأعزاء

أحيانا كثرة التركيز في مشكلة معينة تجعلك لا ترى الحل وهو اما عينيك

هههههههههههههههههه

هذا ما حدث في هذه المشاركة

لو اني قد فكرت قليلا ثم عكست الكود هكذا لعرفت الحل

Static MonWd As Word.Application
Static wmonwd As Word.Document
Set MonWd = New Word.Application
MonWd.Visible = True
Dim z
z = List1.Text
Set wmonwd = MonWd.Documents.Open(App.Path & "\Tests\" & (z) & ".doc")
With wmonwd
'-------------------Referance table ------------------
RefT1.Caption = .FormFields("W_RefT1").Range
RefT2.Caption = .FormFields("W_RefT2").Range
'======--------------------=============------------==============
'.SaveAs Filename:=App.Path & "\Tests\Archeive\" & Trim$(txtCode.Text) & " " & Trim$(z) & ".doc"
'======--------------------=============------------==============

End With
Set MonWd = Nothing
Set wmonwd = Nothing


آسف على عدم التركيز وارجو ان يستفيد البعض من هذه المشاركة

Smile Smile Smile Smile Smile Smile Smile Smile Smile Smile Smile Smile Smile Smile Smile