visual basic & msword

K

kiran chand

I need to run word operations from visualbasic6.

these operations are such as If I specified the dimensions in vb,
those dimensions should be applied as page
alignments(left,right,bottom,top) for word document, similarly spell
checking etc from a single click from vb6.

If I selected a folder insetead of a word document, all the
documents present in that folder should be updated as per the
sepecifications that I mentioned in vb coding.

If any of U know Plz help me
 
J

Jonathan West

Hi Kiran,

3 parts to this.

1. Controlling Word.
The following article describes with sample code how to control Word from
Excel. But much the same principle apply to controlling Word from VB6

Control Word from Excel
http://www.mvps.org/word/FAQs/InterDev/ControlWordFromXL.htm

2. Setting page margins
The page margins are properties of the document's PageSetup upbject. Note
that the margins are specified in points. Make sure you do the appropriate
conversions.

3. Batch processing
The following article shows one way of getting a list of all the files in a
folder and processing each file in turn. You will be able to replace the
find/replace code with your own page setup code.

Find & ReplaceAll on a batch of documents in the same folder
http://www.mvps.org/word/FAQs/MacrosVBA/BatchFR.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top