plz urgent help needed
i have one data grid in the form. i have to export the data from the datagrid to the word.
i just exported the data in MS word into a table. but i want to remove the table border. but i am not able to do so till now
can any one help me in this matter
i am using vb6.
TIA
12 10236 SammyB 807
Recognized Expert Contributor
plz urgent help needed
i have one data grid in the form. i have to export the data from the datagrid to the word.
i just exported the data in MS word into a table. but i want to remove the table border. but i am not able to do so till now
can any one help me in this matter
i am using vb6.
TIA
After Word appears, record a maco that deletes the border, then look at the code and it will show you what objects to use. Your code will be something like - oDocument.Tables(1) .Borders(wdBorderTop).LineStyle = wdLineStyleNone
-
oDocument.Tables(1) .Borders(wdBorderLeft).LineStyle = wdLineStyleNone
-
oDocument.Tables(1) .Borders(wdBorderBottom).LineStyle = wdLineStyleNone
-
oDocument.Tables(1) .Borders(wdBorderRight).LineStyle = wdLineStyleNone
-
oDocument.Tables(1) .Borders(wdBorderHorizontal).LineStyle = wdLineStyleNone
-
oDocument.Tables(1) .Borders(wdBorderVertical).LineStyle = wdLineStyleNone
-
oDocument.Tables(1) .Borders(wdBorderDiagonalDown).LineStyle = wdLineStyleNone
-
oDocument.Tables(1) .Borders(wdBorderDiagonalUp).LineStyle = wdLineStyleNone
thanx for the suggestion
but it does not work
it doesnot remove the border. it still appears in the table.
i want complete removal of the border
thanx
SammyB 807
Recognized Expert Contributor
thanx for the suggestion
but it does not work
it doesnot remove the border. it still appears in the table.
i want complete removal of the border
thanx
What does your macro do differently to remove the border? or What do you have to do manually to remove the border? and/or Does my code do anything?
thanx again Sam
it just worked in the print preview. it's okay for now, but now i have another problem, how can i format the text in each column in the table. i want the font size, font and the alignment changed in each column.
can u or anyone suggest for this problem??????
best regards
coolminded
thanx again Sam
it just worked in the print preview. it's okay for now, but now i have another problem, how can i format the text in each column in the table. i want the font size, font and the alignment changed in each column.
can u or anyone suggest me for this problem??????
best regards
coolminded
SammyB 807
Recognized Expert Contributor
thanx again Sam
it just worked in the print preview. it's okay for now, but now i have another problem, how can i format the text in each column in the table. i want the font size, font and the alignment changed in each column.
can u or anyone suggest me for this problem??????
best regards
coolminded
Use oDoc.Table(1).C ell(1,1).Range and you will find Font.Size, Font.Size, ParagraphFormat , etc. You will have to iterate thru all of the cells. There is a Columns property, but no Range object under that. In Word, everything revolves around the Range object.
sorry to bother u again but the code u provided did not work. coz the cells(1,1) is not allowed and neither other properties like bold, and all other things is allowed, plz help.
following is my code i used to show all the items one by one in each line in word without the border of the table.
plz have a look and plz suggest what should i do to have so, with all the items centered aligned and the size of the font is different for each items with different font name. - Private Sub command2_click()
-
Dim oWord As Word.Application
-
Dim oDoc As Word.Document
-
-
Dim i As Integer
-
Dim X
-
Dim w As Integer
-
Set oWord = New Word.Application
-
Set oDoc = New Word.Document
-
-
oDoc.ActiveWindow.Selection.Tables.Add Range:=oDoc.ActiveWindow.Selection.Range, numrows:=1, numcolumns:=1
-
oDoc.ActiveWindow.Selection.FormattedText.AutoFormat
-
oDoc.Tables(1).Borders(wdBorderLeft).Visible = False
-
oDoc.Tables(1).Borders(wdBorderTop).Visible = False
-
oDoc.Tables(1).Borders(wdBorderBottom).Visible = False
-
oDoc.Tables(1).Borders(wdBorderRight).Visible = False
-
oDoc.Tables(1).Borders(wdBorderHorizontal).Visible = False
-
oDoc.Tables(1).Borders(wdBorderDiagonalUp).Visible = False
-
oDoc.Tables(1).Borders(wdBorderVertical).Visible = False
-
oDoc.Tables(1).Borders(wdBorderDiagonalDown).Visible = False
-
i = 0
-
w = 0
-
For i = 1 To fg.Rows - 1
-
-
If w = 0 Then
-
w = w + 1
-
oDoc.Tables(1).Columns(1).Cells(w).Range.Text = fg.TextMatrix(i, 0)
-
-
Else
-
w = w + 1
-
oDoc.Tables(1).Columns(1).Cells.Add
-
oDoc.Tables(1).Columns(1).Width = 500
-
oDoc.Tables(1).Columns(1).Cells(w).Range.Text = fg.TextMatrix(i, 0)
-
End If
-
-
w = w + 1
-
oDoc.Tables(1).Columns(1).Cells.Add
-
oDoc.Tables(1).Columns(1).Width = 500
-
oDoc.Tables(1).Columns(1).Cells(w).Range.InlineShapes.AddPicture FileName:=fg.TextMatrix(i, 3), _
-
SaveWithDocument:=True
-
-
w = w + 1
-
oDoc.Tables(1).Columns(1).Cells.Add
-
oDoc.Tables(1).Columns(1).Width = 500
-
oDoc.Tables(1).Columns(1).Cells(w).Range.Text = fg.TextMatrix(i, 1)
-
-
w = w + 1
-
oDoc.Tables(1).Columns(1).Cells.Add
-
oDoc.Tables(1).Columns(1).Width = 500
-
oDoc.Tables(1).Columns(1).Cells(w).Range.Text = fg.TextMatrix(i, 2)
-
Next i
-
Unload FrmBar1
-
oDoc.ActiveWindow.Document.Close True
-
Set oDoc = Nothing
-
oWord.Quit False
-
Set oWord = Nothing
-
Set Db = Nothing
-
End Sub
again thanx in advance.
SammyB 807
Recognized Expert Contributor
>coz the cells(1,1) is not allowed
try cell(1,1) without the s
like I posted :)
BTW, You can use .Columns(i).Cel ls(iRow).Font.N ame = "Arial"
this time you use Cells with the s
but your code is strange, don't you want Columns(i) instead of Columns(1)?
>coz the cells(1,1) is not allowed
try cell(1,1) without the s
like I posted :)
BTW, You can use .Columns(i).Cel ls(iRow).Font.N ame = "Arial"
this time you use Cells with the s
but your code is strange, don't you want Columns(i) instead of Columns(1)?
once again thanx
why i use columns(1) instead of columns(i) because i want all the items displayed in a single column. i want to show it as it is displayed in the different line of the word document. but not in a matrix format.
it worked perfectly, i can use the different font name, with different font size,
but now i want to change its alignment. i.e. either left, or right, or center or justified. it doesn't show the alignment property. how can i set the property to center alignment, or right alignment and so on.
can you help me in this matter.
TIA
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: wk |
last post by:
Hi,
I have a seemingly simple html code which has two tables one under
another, and both have an image of same size...but the table row also
has some text, which seems to be creating a small gap between the two
images on display. Can anybody tell me how to remove the thin gap
between the two images?
<table cellpadding="0" cellspacing="0" border="0">
<tr>
|
by: David Findlay |
last post by:
I'm trying to do a table for laying out a links page in CSS. See
http://qldstorms.com/links.php. My stylesheet is at
http://qldstorms.com/styles/screen.css. My problem is that if the link name
in the first column get's word wrapped, but the description text in the
second column doesn't, the next row get's wrapped to sit next second line
of the link name. Also if a two line link name is last in the category box,
it'll cross the outside of...
|
by: Steve Franks |
last post by:
I am using VS.NET 2005 beta 2. When I run my project locally using the
default ASP.NET Development Web Server it runs using a root address like
this:
http://localhost:11243/testsite/
However when I deploy to a remote test server running real IIS, the real
root of my application becomes:
http://localhost/
What I want to do is have it so that on my local machine the asp.net dev
|
by: astarocean |
last post by:
using pyparsing to deal with nested tables , wanna keep table's
structure and propertys .
but program was chunked with the </td> tag of inner table.
have any ideas?
here's the program
from pyparsing import *
|
by: outstretchedarm |
last post by:
I'm extremely new to javascript and to programming in general.
I am trying to create an interactive table. I have already created the
table with constants, in the key of C (it is for music). what I would
like to do is to create a dropdown box that would enable the user to
select all 12 keys, then based on that choice, have the whole table
re-calculate, basically transposing all the data up or down.
how would I go about doing this.
| |
by: McKirahan |
last post by:
I an using ASP to read a database table and generate an HTML table
which is save via FSO with a file extension of .xls which opens up
in MS-Excel. I am inserting several lines of text into a cell and would
like to force a line break between them.
I recorded an MS-Excel macro so see how Alt-Enter was captured
which turned out to be Chr(10) which is the same as vbLf (right?)
I tried inserting that in character in the text but it didn't...
|
by: Sarita |
last post by:
Hello,
this might sound stupid, but I got a really nice homepage template
which unfortunately is a 3-Column Fixed Width CSS format. Now I don't
have any content for the right column and would like the middle column
just to use up that space instead.
Any way this is possible?
Thanks for your help, it is highly appreciated!
|
by: Romulo NF |
last post by:
Greetings again to everyone,
Im back to show this grid componenet i´ve developed. With this grid you can show the data like a normal table, remove the rows that you need, add rows, import data, call determined functions, and edit the data already present
What will you need to use the grid? A table with standard markup and an ID to call the script that will turn the table into a grid
Parameters:
tabelaID => id of the table that will...
|
by: dolittle |
last post by:
Hi,
I'm embedding a last.fm flash widget.
I want to be able to remove it from the page using javascript.
I've tried to delete the html element that contains the code but it keeps playing in IE. In FF it stops playing but I can't tell if it is removed or not.
Can I do it in javascript or maybe I need a FLASH script to do it?
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |