Convert VB Macro code to VB.NET or C#

Hello all i want to convert the following Vb macro code to VB.NET ot C#

how to do that ? any help ?

Set myrange = objword.Selection.Range
myrange.Collapse

Set myTable = objword.ActiveDocument.Tables.Add(myrange, 2, 5)

With myTable
With .Borders(wdBorderLeft)
.LineStyle = wdLineStyleSingle
.LineWidth = wdLineWidth050pt
.Color = wdColorAutomatic
End With

With .Borders(wdBorderRight)
.LineStyle = wdLineStyleSingle
.LineWidth = wdLineWidth050pt
.Color = wdColorAutomatic
End With

With .Borders(wdBorderTop)
.LineStyle = wdLineStyleSingle
.LineWidth = wdLineWidth050pt
.Color = wdColorAutomatic
End With

With .Borders(wdBorderBottom)
.LineStyle = wdLineStyleSingle
.LineWidth = wdLineWidth050pt
.Color = wdColorAutomatic
End With

.Borders(wdBorderHorizontal).LineStyle = wdLineStyleNone
With .Borders(wdBorderVertical)
.LineStyle = wdLineStyleSingle
.LineWidth = wdLineWidth050pt
.Color = wdColorAutomatic
End With

.Borders(wdBorderDiagonalDown).LineStyle = wdLineStyleNone
.Borders(wdBorderDiagonalUp).LineStyle = wdLineStyleNone
.Borders.Shadow = False
End With

myTable.columns(1).SetWidth ColumnWidth:=60, RulerStyle:=wdAdjustFirstColumn
myTable.columns(2).SetWidth ColumnWidth:=80, RulerStyle:=wdAdjustFirstColumn
myTable.columns(3).SetWidth ColumnWidth:=80, RulerStyle:=wdAdjustFirstColumn
myTable.columns(4).SetWidth ColumnWidth:=80, RulerStyle:=wdAdjustFirstColumn
myTable.columns(5).SetWidth ColumnWidth:=160, RulerStyle:=wdAdjustFirstColumn

myTable.Cell(1, 1).Shading.BackgroundPatternColorIndex = wdGray25
myTable.Cell(1, 2).Shading.BackgroundPatternColorIndex = wdGray25
myTable.Cell(1, 3).Shading.BackgroundPatternColorIndex = wdGray25
myTable.Cell(1, 4).Shading.BackgroundPatternColorIndex = wdGray25
myTable.Cell(1, 5).Shading.BackgroundPatternColorIndex = wdGray25

Thanks in advance
1
ddp2307
12/20/2004 4:54:39 AM
asp.net.getting-started 91979 articles. 4 followers. Follow

0 Replies
1181 Views

Similar Articles

[PageSpeed] 47

Reply:

Similar Artilces:

How to convert C#.Net code to VB.Net code ???...
HI, i was searching something new, then i suddenly find some tips to convert C#.Net code to VB.Net but i did not do well. i am puttint its url here plz tell me how to convert C#.Net code to VB.Net. http://www.dotnetspider.com/code/C-273-Convert-C-VB-NET.aspx Jasim...Please remember to click “Mark as Answer” on the post that helps youJasim AkhtarNew Delhi ( INDIA ) It would be better if you write the problem you having, while converting from C# to VB.NET. You cannot completely rely on online converters. ThanksMark post(s) as "Answer" that helped youElectronic ScrewWebsite||Bl...

Sending SMS using vb.net or C#.net using vb.net or c#.net
Hi  My requirement is I hav one csv file with these fields id,mobilenum,messgae,status.intiallu staus is 0. once i read the all fileds and take that mobile number.using tat mobile number  i need to send sms .after sending sms i shuld change status as 1 How to send sms thru coding (please dont provide any links.if it is provide also please give working links becox i checked codeproject .i didnt get any nice link. and also provide the how to update the status field im csv file   Thank ssandhya   To send SMS, you need some third party SMS providers. if you consul...

use VB.NET and C#.NET code in the same C#.NET project
All-- Here is a sample that is "off the beaten path", (at least for me). Is it possible, in an ASP.NET application, using the code-behind page building technique, to have both pages written in VB.NET and pages written C#.NET?At http://www.WebLogicArts.com/DemoList.aspx there is a sample that shows that, (contrary to popular belief), it IS possible to mix ASP.NET pages built with C#.NET with ASP.NET pages built with VB.NET in the same VS.NET 2003 project. Note that this is just a "fun" sample to see if it can be done and I do not recommend this practice as a "standard" way of develo...

converting to vb.net from c#.net authorize.net
authorize.net offered me some sample code when I signed up with them the only problem is the sample code is in c#.net but my page that they type all of their credit card into is vb.net <code><%@ Import Namespace="System.Net" %> <%@ Import Namespace="System.IO" %> <script language="C#" runat="server"> void Page_Load(Object Src, EventArgs E) { myPage.Text = readHtmlPage("https://certification.authorize.net/gateway/transact.dll"); } private String readHtmlPage(string url) { ...

Translate c#.net code to vb.net code
Hi I can usually do the translation myself, but this time I am a bit stumped  Let us consider to rewrite Urls (more than 16000 links) using a table. Save original url and rewritten url in a table. Now add a class file in App_Code folder. class UrlRewriteModule : IHttpModule{    public void Dispose()    {        // Nothing to dispose    }    public void Init(HttpApplication context)    {        context.BeginRequest += new EventHandler(context...

used a c#.net to vb.net converter and am now getting a syntax error.
ok I used a cool utility at http://www.kamalpatel.net/ConvertCSharp2VB.aspx to convert some c#.net to vb.net and it spit out a bunch of code which almost works but I am getting a syntax error on this line Imports (StreamReader sr = Shadows Function)() As StreamReader(objResponse.GetResponseStream()) I tried it that way and also like Imports (StreamReader sr = Shadows Function)() As StreamReader(objResponse.GetResponseStream()) but either way gave the same error Compiler Error Message: BC30035: Syntax error. Source Error: Line 26: Line ...

how to convert VB.NET code this code to C#
Hi I have the following code whihc I need to convert to C# since I dont know VB.NET any ideas how to do this: Imports System.IO Imports System.Reflection Add the following code to the class: Private Function GetSql(ByVal Name As String) As String Try ' Get the current assembly. Dim Asm As [Assembly] = [Assembly].GetExecutingAssembly() ' Resources are named using a fully qualified name. Dim strm As Stream = Asm.GetManifestResourceStream(Asm.GetName().Name + "." + Name) ' Read the contents of the embedded file. ...

How could i convert this code vb in vb.net?
Dim Report As CRAXDRT.ReportDim ReportSub As CRAXDRT.ReportDim ReportSub1 As CRAXDRT.Report Dim m_crwDatabase As CRAXDRT.Database Dim MaxDetail As IntegerDim MaxMain As Integer Dim PageCountMax As Integer Private Sub Command1_Click()     PayableVoucher "应付款挂帐单", "应付组"        End Sub Private Sub Command2_Click()     Command1.Visible = True    CRViewer1.Visible = False    Command2.Visible = False    Command3.Visible = True    Me.WindowState = 0     ...

convert code from VB to VB.Net
hi, I have both an offline application (done with Visual Basic 6.0 ) and an online application (thru ASP.Net 2.0 and Visual Basic as code behind). Right now, I have a code in Visual Basic for encrypting a file. This is working in my offline application. However, when I used the code in my online application, it got some errors in it. Maybe incompatibility with the language used. Is there any way I can convert my VB code to VB.Net? Thanks a lot. Sheila   Rock on!!! Get the VB6 code advisor from http://msdn2.microsoft.com/en-gb/vbasic/ms789135.aspx and check you existing...

Converting from vb.net to c#.net
Hello I have recently purchased VBGolds RawDataPrinter which should allow users to print directly to label printers on our network directly from a c# web form.  Unfortunately they only supply vb.net examples and I have need of c#.  The component has been installed on our web server.  This is some code that they have supplied as examples in vb.net   "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" >"Head1" runat="server&qu...

Is there a software to convert VB codes to VB.net codes automatically?
hi there! Do anyone of you know if there is any software to convert VB codes to VB.net codes? Or must i maunally convert them? Visual Studio.NET 2000 and 2003 versions automatically convert VB 6 code to VB.NET code, for the most part. Refer to Preparing Your Visual Basic 6.0 Applications for the Upgrade to Visual Basic .NET for more information. Hope this helps, AppanASP.NET Team This posting is provided "AS IS" with no warranties, and confers no rights. thanks! =) Is this case same for Visual C codes? Same concept. Refer to Managed Extensions for C++ Migratio...

Convert VB.Net to C# with C-Sharpener For VB 2.2
C-Sharpener For VB automatically converts VB.Net projects to C# projects through a Visual Studio Add-in. It has a simple to use Wizard interface and typically converts 99%+ of the VB.Net code. You can download a free trial version.We have just released version 2.2 which increases the trial size limit from 500 to 1000 lines of code. We have also improved handling of manifest files, long project paths, Visual Studio 2005 installation, and more.You can find out more athttp://www.elegancetech.com/csvb.aspxRoger JackPresidentElegance Technologies, Inc....

Convert VB.Net to C# with C-Sharpener For VB 1.3
C-Sharpener For VB automatically converts VB.Net projects to C# projects through a Visual Studio Add-in. It has a simple to use Wizard interface and typically converts 99%+ of the VB.Net code. You can download a free trial version. We have just released version 1.3 which improves the conversion rate, adds a command-line interface, and more. You can find out more at http://www.elegancetech.com/csvb.aspx?src=xxx Roger Jack President Elegance Technologies, Inc. ...

Convert VB.Net to C# with C-Sharpener For VB 1.4
C-Sharpener For VB automatically converts VB.Net projects to C# projects through a Visual Studio Add-in. It has a simple to use Wizard interface and typically converts 99%+ of the VB.Net code. You can download a free trial version. We have just released version 1.4 with several new features including an option to automatically convert non-default properties with parameters to get and set methods, support to convert On Error Goto to Try/Catch, automatic insertion of return statements to code paths with missing return statements, and more. You can find out more at http://www.elegancet...

Web resources about - Convert VB Macro code to VB.NET or C# - asp.net.getting-started

List of converts to Buddhism - Wikipedia, the free encyclopedia
Ajahn Brahm (born 1951), Religious teacher and student of the late Thai monk Ajahn Chah . Currently he is the abbot of the Bodhinyana Monastery, ...

Facebook Timeline For Pages: 8 Million Converts, 29 Million To Go
... reach to 98 percent of users who liked its page, as well as to double its engagement rate, during a 28-day period. Dr. Pepper hasn’t yet converted ...

Facebook stock roundup: Execs offload more stock, directors convert shares
... Bowles, the former co-chair of the now-defunct National Commission on Fiscal Responsibility and Reform, and Reed Hastings, Netflix CEO, converted ...

How to Convert Leads Into Buying Customers - The 9 Step Sales Process EVERYONE Should Use
... School of Business in Toronto on the topics of Sales and Entrepreneurship. I shared with them the sales process that I find How to Convert Leads ...

Bitcoin : Should I convert my savings to Bitcoin?
Answer (1 of 7): You should think of this question as "Should I invest all my savings in Bitcoin?", and not "Should I have my savings denominated ...

Coordinates - Calculate and Convert a Position on the App Store on iTunes
Get Coordinates - Calculate and Convert a Position on the App Store. See screenshots and ratings, and read customer reviews.

Catholics should not convert Jews, says Vatican, in push against anti-Semitism
... 50 years since the Vatican's repudiation of the concept of Jewish guilt for Jesus' death.  Vatican City: Catholics should not try to convert ...

Opinion: These 5 things made me a happy iPad Pro convert
... like I needed a bigger device. But after three weeks with my iPad Pro, several things have changed my mind, and I’m officially a happy convert ...

$100 device converts all your film to digital photos
... still on film negatives. Today, we've got the perfect Amazon Cyber Week deal for you: A Wolverine F2D Mighty 20MP 7-in-1 Film to Digital Converter ...

"ISIS 'ranks' the women, considering foreign women and converts to be especially 'valuable.' "
"According to French journalist Anna Erelle’s recent exposé , ISIS foreign fighters prefer foreign women and converts because the jihadists find ...

Resources last updated: 12/14/2015 9:22:31 AM