User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Visual Basic 4 / 5 / 6 section within the Software Development category of DaniWeb, a massive community of 391,808 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,483 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Visual Basic 4 / 5 / 6 advertiser:
Views: 1637 | Replies: 3
Reply
Join Date: Sep 2006
Posts: 2
Reputation: kmbhat1971 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
kmbhat1971 kmbhat1971 is offline Offline
Newbie Poster

Question Arabic printing

  #1  
Sep 14th, 2006
I have been developing a program in visual basic 6.0 with multi language facility both in English and Arabic. The problem here is I can type Arabic, but while making printout(IN WORD DOCUMENT) from text boxes or labels i get some other FONTS.Kindly Help me out.
Last edited by Comatose : Sep 14th, 2006 at 9:35 pm. Reason: Let's try not to over do the bold....
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Nov 2005
Location: Montreal, QC (Almost)
Posts: 130
Reputation: Yomet is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 9
Yomet Yomet is offline Offline
Junior Poster

Re: Arabic printing

  #2  
Sep 15th, 2006
kmbhat1971,

If I understand your problem correctly you are transferring data from VB to a Word document but when you do this the text does not display in the correct font. Is this correct?

If so what you need is simply to tell Word to use the correct font before entering the text.

Assuming that you are using the "TypeText" method of the "Selection" object to enter text into your Word document you would use the "Font.Name" property to change the font before entering the text.
   Selection.Font.Name = "Arial"
   Selection.TypeText "First line of text"
   Selection.TypeParagraph
   Selection.Font.Name = "Times New Roman"
   Selection.TypeText "Second line of text"

Hope this helps

Yomet
Reply With Quote  
Join Date: Sep 2006
Posts: 2
Reputation: kmbhat1971 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
kmbhat1971 kmbhat1971 is offline Offline
Newbie Poster

Re: Arabic printing

  #3  
Sep 17th, 2006
Thanks Yomet ,
I have tried this code but the result is same .Let me explain my problem
In vb textbox Arabic font display properly.
I used the word document object for creating report (i.e. sending text form vb application to word application).
While creating report in Arabic language, when I am sending Arabic text from vb application to word application, in word document it shows junk characters.
While my machine (xp Os) supporting Multilanguage futures. I.e. I can write in word document using Arabic font directly.
Kindly give ur suggestions ..
Reply With Quote  
Join Date: Nov 2005
Location: Montreal, QC (Almost)
Posts: 130
Reputation: Yomet is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 9
Yomet Yomet is offline Offline
Junior Poster

Re: Arabic printing

  #4  
Sep 17th, 2006
kmbhat1971,

OK, let's see where we can get from here.

Have you tried to set the language in the Word document to Arabic?

Selection.LanguageID = wdArabicAlgeria

I know you might not use the wdArabicAlgeria language but it was the first on the list, just select the one that is appropriate for you.

This code, as well as the Selection.Font.Name, should be run in the Word document BEFORE any text is typed.

Try this and we'll see.

Happy coding

Yomet
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb Visual Basic 4 / 5 / 6 Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum

All times are GMT -4. The time now is 5:35 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC