473,378 Members | 1,383 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Drawing a line on the cursor position

hello I send to items to Microsof t word with this code:

Expand|Select|Wrap|Line Numbers
  1.   Dim wdApp As Word.Application
  2.    Dim oDoc As Word.Document
  3.    Dim oRange As Word.Range
  4.  
  5.    'Create new hidden instance of Word.
  6.    Set wdApp = New Word.Application
  7.  
  8.    With wdApp
  9.        ' Show this instance of Word.
  10.        .Visible = True
  11.        .ScreenUpdating = False
  12.        ' Code to automate Word here.
  13.        'Add a new document
  14.        Set oDoc = .Documents.Add
  15.    End With
  16.    Set oRange = oDoc.Range
  17.    With oRange
  18.        'move the cursor to start
  19.        .Collapse wdCollapseStart
  20.        'Make center current paragraph alignment
  21.       .ParagraphFormat.Alignment = wdAlignParagraphCenter
  22.        'To insert a paragraph or new line
  23.  
  24.        'to insert a text
  25.        .InsertAfter "مکانيزم پرداخت پزشک خانواده"
  26.        'Move the insertion point to end;
  27.       .Collapse Direction:=wdCollapseEnd
  28.        .InsertAfter vbCrLf
  29.  
  30.  
  31.        .InsertAfter "نام و نام خانوادگي" & ":" & Label7.Caption
  32.        .InsertAfter vbTab
  33.        .InsertAfter "سال" & ":" & MSFlexGrid1.TextMatrix(1, 1)
  34.  
  35.  
  36.  
after this code I want draw a line in this document .
How can I do this?
Oct 10 '09 #1
0 1301

Sign in to post your reply or Sign up for a free account.

Similar topics

19
by: Atif | last post by:
Hello all, In my html page I want to add an image say of 800x600. Now I want that when ever I am given two coordinates on this image say (x1, y1)=(50, 100) and (x2, y2)=(200, 300), the java script...
4
by: susanlimsg lim | last post by:
I have tried to resolved this problem but I dunno how to resolved it can anyone help me?? It cannot be successfully displayed at the mozilla environment // written by Tan Ling Wee on 2 Dec...
4
by: Stuart Norris | last post by:
Dear Readers, I am attempting to draw box around some text using unicode on multiline label. The label is forty characters wide and 12 lines deep. I have been trying to draw a box around text...
22
by: DraguVaso | last post by:
Hi, For my application I need the following behavior: When I press F4 the cursor has to move to the next line in my multiline textbox which begins with "0". Finding lines starting with 0 isn't...
1
by: AMT2K5 | last post by:
Hello, I am just wondering if there is an easy way to do the following in my constructor IOScreen(int row, int col, int width, int height); sets the row, col, width, height attributes of the...
9
by: liorm | last post by:
Hi folks, I need to write a short program which gets a few parameters and draws a diagram in the text file. Basically what I need is a guidance on how I put stream indicator to the required...
2
by: Tom C | last post by:
I see a lot of posts about creating a cursor from an image but is it possible to do the opposite? We have added code to allow a text box on a statusbar to be dragged to allow dropping an open...
5
by: Macias | last post by:
Hi, Please help me, how I can make a line drawing on PictureBox similar to MS paint. I thinking about this: click and hold button, move mouse and relase button. I'm trying useing this...
4
by: mike | last post by:
I have the opportunity to rescue a project that uses a mouse to sense the relative position of a machine. The hardware is built...just needs to be programmed. Stop snickering!!! I didn't do it...I...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.