Question about Computers & Internet

1 Answer

To fix the page layout to

Hello Sir,
I am writing a program to open word document using VB6.
I want to fix the print setup to A5 pagesize.
Alo I want to display the text in richtextbox in word document using VB6.
Can you please help me.
Thanks in advance

Posted by on

1 Answer

  • Level 1:

    An expert who has achieved level 1.

    Corporal:

    An expert that hasĀ over 10 points.

    Problem Solver:

    An expert who has answered 5 questions.

  • Contributor
  • 11 Answers

Oomar,

Using Word with VB6, I show how you set the page size to A5:

Sub AutomateWord()
' Declare the variable.
Dim objWD As Word.Application
' Set the variable (runs new instance of Word.)
Set objWD = CreateObject("Word.Application")
' Add a new document.
objWD.Documents.Add
' Add some text.
objWD.Selection.TypeText "This is some text."
'Set Page Size
objWD.ActiveDocument.PageSetup.PaperSize = wdPaperA5
' Save the document.
objWD.ActiveDocument.SaveAs FileName:="mydoc.doc"
' Quit Word.
objWD.Quit
' Clear the variable from memory.
Set objWD = Nothing
End Sub

Hope this helps!

Posted on Mar 19, 2008

1 Suggested Answer

6ya6ya
  • 2 Answers

SOURCE: I have freestanding Series 8 dishwasher. Lately during the filling cycle water hammer is occurring. How can this be resolved

Hi,
a 6ya expert can help you resolve that issue over the phone in a minute or two.
best thing about this new service is that you are never placed on hold and get to talk to real repairmen in the US.
the service is completely free and covers almost anything you can think of (from cars to computers, handyman, and even drones).
click here to download the app (for users in the US for now) and get all the help you need.
goodluck!

Posted on Jan 02, 2017

Add Your Answer

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

1 Answer

How to create a program using visual basic 6.0 kindly give me a sample program using VB 6.0, with the codes.


The "Hello World" program is always the first program you should write in any language, as it will show you very basic use of the language.
Here is a tutorial of a "hello world" program for VB6.
Hope this helps, good luck!

Aug 13, 2010 | Microsoft Visual Basic 6.0 (361-00686) for...

1 Answer

How to use images as comamnd button in vb6?


Hello,

Put an image on your form. Write in method On_Click the code for your button.

I do the same

Mar 01, 2010 | Microsoft Visual Basic Enterprise Edition...

1 Answer

How to setup visual basic 6.0


  1. One of the first and best things to do is begin to understand the Visual Basic IDE (Integrated Development Environment). By understanding the IDE you will be able to develop VB programs quickly and effectively. Start by reading the Getting to know the VB6 IDE tutorial
  2. The classic first program in any language is the Hello World tutorial. As a beginner you should make sure you write this program to get your feet wet. Check out the Simple Hello World VB6 tutorial
  3. Good programmers figure out how to use a consistent naming scheme when they develop applications. The quickest way to graduate out of the beginner VB6 level is to check out the Object Types and Naming Scheme VB tutorial
  4. Variables are used in any real development. Make sure you visit the Quick Variable tutorial to see how variables work in Visual Basic 6
  5. (Optional) More In Depth Understanding variables and types in VB6
  6. When you need to make comparisons or have your program choose between options you will need to understand Visual Basic's if statements. Luckily there's a beginners tutorial that explains just that: Understanding the if conditional statement
  7. Once you grasp the basics check out this next beginner VB6 tutorial that goes more in depth into conditional statements: Understanding if statements and conditionals in VB6
  8. Need to do something repeatedly? Need to iterate through a list of things? Need to count from 1 to 1 Billion by 3's? You need to understand loops! Understanding For, Do, and while Loops
  9. Once a beginner understands how to use functions and subroutines he or she is on the road to being a full fledged VB6 guru. A solid grasp on functions and subroutines allows you to reuse code and functionality throughout your program and in future programs.Functions and Subroutines in VB6 tutorial
  10. Last but not least, begin to learn how to use all the great controls Visual Basic offers and create a great User Interface for your clients to use. Basic Graphical User Interfaces in VB6 - Tutorial
Once you have finished these tutorials you should have a very good understanding of the fundamentals of the Visual Basic 6 language and development environment. Feel free to download some more advanced tutorials and continue learning on your own. If you have any questions or comments related to this Visual Basic 6 guide please post them below.

Jan 27, 2010 | Microsoft Visual Basic 6.0 for PC

1 Answer

How to do a reverse form feed in Visual Basic 6


Two things to consider:

1) The printer itself must be designed to handle reverse form feeds. I am not sure how many these days are.

2) If you're printer can handle reverse form feeds then it should be a simple matter to send the appropriate ascii code to the printer to initiate it. Much the same as if you wanted to have the printer do a line feed.

Good luck and thanks for using FixYa.

Mar 18, 2009 | Microsoft Visual Basic 6.0 for PC

1 Answer

I want to open a jpg and doc file through command button in vb6


try to convert it to vb6 file and open it via vb6.... heres the link >>>> http://3d2f.com/tags/vb6/converter/registered/software/

Feb 28, 2009 | Microsoft Visual Basic 6.0 for PC

1 Answer

How to write a programe to convert F to C


See http://www.ehow.com/how_4551691_convert-fahrenheit-celsius-vbnet.html

The tutorial is for VB.Net, but when using VB6 it should be 90+ % the same ... The single line of code for the conversion is VB6 compatible so only the GUI handling code is slightly different.

Feb 11, 2009 | Microsoft Visual Basic 6.0 for PC

1 Answer

How can i print datas from MSFlexGrid in VB6


I hear a lot of people are asking that question. I am sure its possible.
Try this:

For i = 0 To Form1.MSFlexGrid1.Col
For j = 0 To Form1.MSFlexGrid1.Row
Print Form1.MSFlexGrid1.TextMatrix(i, j)
Next j
Next i

That should move the data. I think. This isn't my best area; however, It doesn't hurt to try it right?

Hope it helps.

Nov 21, 2008 | Computers & Internet

1 Answer

Formatting/Rounding number


forget its not your cup of tea

Jul 31, 2008 | Computers & Internet

1 Answer

Crystal Report


Hello CPA,
The communications protocol may not be correct between VB6 and printer. Look in the Add-in Manager for the proper printer lib. Crystal is hard to work with from VB6. I know this is not much, but have you tried using the application wizard? Also there is a lot of information on MSN @ microsoft.

Jan 22, 2008 | Computers & Internet

Not finding what you are looking for?
Computers & Internet Logo

Related Topics:

113 people viewed this question

Ask a Question

Usually answered in minutes!

Top Computers & Internet Experts

Brian Sullivan
Brian Sullivan

Level 3 Expert

27725 Answers

kakima

Level 3 Expert

98868 Answers

David Payne
David Payne

Level 3 Expert

14086 Answers

Are you a Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...