How to change font of a textbox in any application from my application


In vb6 how to change fonts in other applications like MS-WORD, PageMaker, etc. from my vb program Please guide me.
Posted On: Wednesday 12th of September 2012 11:33:49 PM Total Views:  80
View Complete with Replies

RELATED TOPICS OF Visual Basic PROGRAMMING LANGUAGE




Use specific Exchange account to send message from in vbsctipt

Hi all,  Please help me with my scripting problem. Here is the situation:  I have to send a message from specific email address from VBScript. I've got Exchange server 2003 and MS Outlook 2007 as an appplication if this matters.   My code is listed below. It works perfect but I sending out message only from my profile. How to use ns.Logon correctly to use another account or should I use something else instead of it   Dim ToAddress  Dim MessageSubject  Dim MessageBody  Dim MessageAttachment  Dim ol, ns, newMail  ToAddress = "someone@domain.com"   MessageSubject = "subject text"  MessageBody = "body"  MessageAttachment = "path_to_attachment"  Set ol = WScript.CreateObject("Outlook.Application")  Set ns = ol.getNamespace("MAPI")  ns.logon "", "", true, false  Set newMail = ol.CreateItem(olMailItem)  newMail.Subject = MessageSubject  newMail.HTMLBody = MessageBody & vbCrLf  Set myRecipient = ns.CreateRecipient(ToAddress)  myRecipient.Resolve  If Not myRecipient.Resolved Then  MsgBox "unknown recipient"  Else  newMail.Recipients.Add(myRecipient)  newMail.Attachments.Add(MessageAttachment).Display name = "name"  newMail.Recipients.Add(CCAddress)  newMail.Send  End If  Set ol = Nothing  
VIEWS ON THIS POST

92

Posted on:

Thursday 13th September 2012
View Replies!

change all fontsizes in graphs with VBA

When a user makes a MS-graph or Excel-graph in Word XP or Word 2003, he can change the fontsize for the characters in the title, the axis, the legend and datalabels. But when the users changes later on the size of the whole graph, all the fontsizes changes as well. I would like to make a macro that changes all the fontsizes (of axes, titles, legends, datalabels, etc.) into 10 points of all the graphs in a Word-document.
VIEWS ON THIS POST

98

Posted on:

Thursday 13th September 2012
View Replies!

How to change the Printer settings to preview DataReport in Vb6.0?

Greetings, I`m using a DataReport in Vb6.0 ActiveX DLL project. I have a report of big margin and size so it needs to set the printer to A4 and Lanscape in order to be preview, I use the following code:  Printer.PaperSize = vbPRPSA4 Printer.Orientation = vbPRORLandscape But I still get the same error:  "Report Width Is LArger Than the Paper Width" Now I`ve left with no solution. I Just want to know how to generate a code that should change the printer settings automatically at run time Please Hurry Up and save my Job.!!
VIEWS ON THIS POST

248

Posted on:

Friday 14th September 2012
View Replies!

odd issue with combo.additem, after attempting to change source of ...

odd issue with combo.additem, after attempting to change source of the path to the file. I have been writing a program and now have hit an odd snag, I have a number of combo boxes that serve as path variables, and I am having issues when i attempt to change from one set of combo boxes to another. The code seems to work fine, other than the fact that when i attempt to use the other combo boxes the last box reads and reports the file contence, but fails to add the items to the combo box. no matter what i do. I was just wondering if any one know why that is happening... I have just about started to pull my hair out over thins as it is needed before i can truely claim to be done with it... Jesse Fender
VIEWS ON THIS POST

102

Posted on:

Friday 14th September 2012
View Replies!

Get current user SMTP address in Exchange

rated by 0 users everybody Could you please share your ideas how I can retrieve current user's smtp address I know it might be hard using only MAPI but I can't use CDO or redemption because organization I design the form for doesn't use these add-ins. I tried several things but none worked for me. If I simply run the code MyPage.Controls("TextBox21").value = Application.Session.CurrentUser.Address I get something like: /O=organization's name/OU=Region/cn=Recipients/cn=user id I heard that it might be possible to achieve if I get the user's id and then look for it through Outlook's Address List from which I can retrieve smtp adress. But I don't know how to code this method.
VIEWS ON THIS POST

68

Posted on:

Sunday 16th September 2012
View Replies!

How to change Object Name in the code accordingly when changed in Design mode?

Everytime when I change a TextBox's Name from TextBox Properties in Design mode, I have to replace its name with the new one manually everywhere in the code. I want that change/replace will automatically occur in the Code accordingly. Is there any such option in vb 6.0 Or any easy way to do that instead of 'Find/Replace'
VIEWS ON THIS POST

103

Posted on:

Sunday 16th September 2012
View Replies!

how to change font colour in run time

I want to know how to change font colour in runtime thx menuka
VIEWS ON THIS POST

91

Posted on:

Sunday 16th September 2012
View Replies!

How to change Object Name in the code accordingly when changed in Design mode?

Everytime when I change a TextBox's Name from TextBox Properties in Design mode, I have to replace its name with the new one manually everywhere in the code. I want that change/replace will automatically occur in the Code accordingly. Is there any such option in vb 6.0 Or any easy way to do that instead of 'Find/Replace'
VIEWS ON THIS POST

150

Posted on:

Sunday 16th September 2012
View Replies!

Exclude Sender from Exchange Disclaimer

I am using Microsoft Knowledge base 317680 to add a disclaimer to outgoing SMTP messages in Visual Basic script, to our Exchange 2003 server.  I need to be able to exclude an address from having the disclaimer added to it.  What is the Visual Basic code to fine the senders address of outgoing mail
VIEWS ON THIS POST

61

Posted on:

Wednesday 19th September 2012
View Replies!

how do I change the default size of a button?

I have been looking at a code sample from Charles Petzold.\t It is from here:\t http://www.charlespetzold.com/blog/2009/05/Realizing-a-Fisheye-Effect-in-Silverlight.html\t it uses mouse over methods to increase the size of button classes.\t I have it working but I want to make some modifications. I want the starting size of the button to be larger. I do not know how much of the code I need to post here to make the issue clear enough. The XAML for the page describes a "FisheyeButton" that is described in a seperate xaml file. Something like this:\t \t\t \t\t \t \t \t\t \t The functionality of the project is such that if I give the Fisheyebutton a width and height a set size at this loction, the effect where the size of the control the effect of becoming larger does not happen. In other words, if I write in the
VIEWS ON THIS POST

121

Posted on:

Friday 21st September 2012
View Replies!

vb 6.0 how to find the Combo box selected change vent

i want to write code under seelcted change event of combo box . i tried change and scroll events ...bu these r not justifying my code .
VIEWS ON THIS POST

142

Posted on:

Friday 21st September 2012
View Replies!

Visual Basic code to change my printers properties

Hi all, I have a repetitive task when runnin Corel Draw and that is to go into the printer properties (in this case a Xerox Phaser 3200mfp) and change the page size to DL Env 110 x 220 mm. What would really be handy would be to have an object linked to some VB code which when clicked on would change the printers properties from A4 to the DL Env 110 x 220mm. The printer properties does allow one to set up a list of 'Favorites' and I have set the required properties in there under the name of "FAF Envelope" Not having used this forum before, is there someone out there who could possibly help me with this Kind regards, Ian Gooden (Port Elizabeth, South Africa)
VIEWS ON THIS POST

104

Posted on:

Friday 21st September 2012
View Replies!

Do I have to change my entire program now cos I use the automated-data binding?

I just started learning to use VB6.0 about 3 months ago by reading what's on the internet. Now after writing a program for sometime I just realised that I have difficulty converting the program into a multi-user platform. Call me dumb...but I didn't know there was so much difference between using the ADO data-binding facilities and now wanting to code all the connections to the database to support the multi-user platform. Does anyone know an easier way of doing thisEg. Is there an equal and equivalent code that I can use to replace what has been utomated' without having to change all the data1.recordset.fields("xxx") statements that I have written
VIEWS ON THIS POST

128

Posted on:

Friday 21st September 2012
View Replies!

Exchange Web Services API

I'm using this code to fetch todays appointments from the Exchange server. Does anybody know how i can retrieve the contactdetails of the attendees, specifically the phone number Can i use the attend.id to somehow bind to the contacts folder and retrieve it or something \t\t\t Dim service = New ExchangeService(ExchangeVersion.Exchange2010_SP1)\t\t\t Dim credential As New NetworkCredential("user", "password", "domain")\t\t\t Dim Url = New Uri("https://MyServer/EWS/Exchange.asmx")\t\t\t Dim prop As New PropertySet(BasePropertySet.FirstClassProperties)\t\t\t service.Url = Url\t\t\t service.Credentials = credential\t\t\t Dim calendar As CalendarFolder = Folder.Bind(service, WellKnownFolderName.Calendar)\t\t\t Dim results = calendar.FindAppointments(New CalendarView(Now, Now))\t\t\t For Each appt As Appointment In results\t\t\t\t\t If appt.Subject.Contains("TEST") Then\t\t\t\t\t\t\t appt.Load(prop)\t\t\t\t\t\t\t ListBox1.Items.Add(appt.Subject & " - " & appt.Start & " - " & appt.End)\t\t\t\t\t\t\t For Each attend As Attendee In appt.RequiredAttendees\t\t\t\t\t\t\t\t\t ListBox1.Items.Add(attend.Address)\t\t\t\t\t\t\t Next\t\t\t\t\t\t\t Exit For\t\t\t\t\t End If\t\t\t Next
VIEWS ON THIS POST

113

Posted on:

Saturday 22nd September 2012
View Replies!

Unable to save changes to a DAO database?

I have an Access 2000 database and because of several reasons beyond my control I have to access the information through DAO in .Net. I've been able to read the records with no problem, and add new records as well, my problem comes when I'm trying to edit the information. Here's a sample of my code: ' initializes the database Public dbE As DAO.DBEngine Public TSSLdb As DAO.Database Public PRS As DAO.Recordset ' opens the database and recordset dbE = New DAO.DBEngine() TSSLdb = dbE.OpenDatabase("C:TEST.MDB") PRS = TSSLdb.OpenRecordset("Select * From [PTable] Order By [PID]") ' edits the record (or tries to) With PRS .Edit() .Fields("HNotVal").Value = PCHNotVal .Update() ' this should save the changes, but doesn't End With I'm not getting any error messages, it's just not saving the changes. Anyone have an idea\t I know that DAO isn't the easiest thing to work with in .Net but everything else that worked in VB6 has worked in .Net. As an aside, When I try to do the edit by using this method: With PRS .Edit() !HNotVal = PCHNotVal ' gets a blue squiggley underline .Update() End With My blue squiggley says that "Property 'Fields' is 'Read Only'". Which I'm guessing is the problem and why it won't save changes, but I can't figure out how to make the fields not read only. I've looked all over, and the best suggestion I've found so far is "Don't use DAO". Which I would love to follow, but I can't lol dp.SyntaxHighlighter.ClipboardSwf = '/dp.SyntaxHighlighter/Scripts/clipboard.swf' dp.SyntaxHighlighter.Highlight('052ef26d5c1e4249afeaf25d1d033857') dp.SyntaxHighlighter.Highlight('2f75836efd1e45829fd38f929ec977ce')
VIEWS ON THIS POST

167

Posted on:

Saturday 22nd September 2012
View Replies!

VB script to change printer properties

What code would be needed to perform these 3 actions in Word 1 - Turn on "print on both sides" 2 - Print the file 3 - Turn off "print on both sides" So the actions are File, Print - Properties, Print both sides, Ok, File, Print - Properties, Turn off print both sides, Close. Or is that even possible In our efforts to reduce the amount of paper being used, we want to develop a button that will allow someone to print on both sides without leaving the setting on for all other apps.
VIEWS ON THIS POST

259

Posted on:

Saturday 22nd September 2012
View Replies!

how to change menu item colour visual basic 6.0

Hi1.When mouse move ,how to change particular menu item colour .2. or how to display menu items in different colours.send me example
VIEWS ON THIS POST

230

Posted on:

Sunday 23rd September 2012
View Replies!

change Access table with sql quary from VB6

, i havetwo Access database tables and i want to activate SQL quary on it (insert into) to transfer details between the tables. how can i do it
VIEWS ON THIS POST

130

Posted on:

Monday 24th September 2012
View Replies!

how to reset the effect of a change-event of a textbox on the caption of a label

I have the caption for a label in a userform change in response to the user changing the value in a textbox on the same userform. As part of my OK button code, i have the original label caption reset, but it doesnt work--the next time the userform is called, the modified caption for the label is there, even though the user hasnt had a chance to change the textbox value....How can I get the label caption to reset when OK button is pressed (the green below changes the caption as the textbook is being edited, and the pink is supposed to change it back to what it was but it doesnt work)
VIEWS ON THIS POST

105

Posted on:

Monday 24th September 2012
View Replies!

How can I change font color of a listview subitem

I am downloading stock data from yahoo finance to a .csv file and populating a Listview I want to change the color of subitem when anothervalueof a subitem changed suppose when Last Trading Price > Day High PriceThen Day High Price color is Blue Please Help me Here is my code to downloading data from yahoo and populating a Listview Dim request As HttpWebRequest Dim response As HttpWebResponse '= Nothing Dim reader As StreamReader Dim retVal As String Dim finsymbol As String Dim fieldValues As String() \tfinsymbol = System.IO.File.ReadText("C:\finsymbol.txt") Dim serverURL As String serverURL = "http://download.finance.yahoo.com/d/quotes.csvs=" & finsymbol & "&f=sl1d1t1c1ohgv&e=.csv" request = HttpWebRequest.Create(serverURL) response = request.GetResponse() reader = New StreamReader(response.GetResponseStream(), System.Text.Encoding.ASCII) 'retVal = reader.ReadToEnd() 'fieldValues = retVal.Split(",") fieldValues = reader.ReadLine().Split(",") \tDim myTable As DataTable = New DataTable() Dim i As Integer Dim myRow As DataRow myTable.Columns.Add(New DataColumn("Name")) myTable.Columns.Add(New DataColumn("Last_Price")) myTable.Columns.Add(New DataColumn("SDate")) myTable.Columns.Add(New DataColumn("STime")) myTable.Columns.Add(New DataColumn("Change_in_RS")) myTable.Columns.Add(New DataColumn("Open")) myTable.Columns.Add(New DataColumn("High")) myTable.Columns.Add(New DataColumn("Low")) myTable.Columns.Add(New DataColumn("Vol")) myRow = myTable.NewRow For i = 0 To fieldValues.Length() - 1 myRow.Item(i) = fieldValues(i).ToString Next myTable.Rows.Add(myRow) While reader.Peek() -1 fieldValues = reader.ReadLine().Split(",") myRow = myTable.NewRow For i = 0 To fieldValues.Length() - 1 myRow.Item(i) = fieldValues(i).ToString Next myTable.Rows.Add(myRow) End While reader.Close() Dim lvwItem As ListViewItem ListView1.Items.Clear() For j As Integer = 0 To myTable.Rows.Count - 1 lvwItem = New ListViewItem lvwItem.Text = myTable.Rows(j).Item("Name").ToString lvwItem.SubItems.Add(myTable.Rows(j).Item("Last_Price").ToString) lvwItem.SubItems.Add(myTable.Rows(j).Item("SDate").ToString) lvwItem.SubItems.Add(myTable.Rows(j).Item("STime").ToString) lvwItem.SubItems.Add(myTable.Rows(j).Item("Change_in_RS").ToString) lvwItem.SubItems.Add(myTable.Rows(j).Item("Open").ToString) lvwItem.SubItems.Add(myTable.Rows(j).Item("High").ToString) lvwItem.SubItems.Add(myTable.Rows(j).Item("Low").ToString) lvwItem.SubItems.Add(myTable.Rows(j).Item("Vol").ToString) ListView1.Items.Add(lvwItem) Next
VIEWS ON THIS POST

135

Posted on:

Monday 24th September 2012
View Replies!