Search Results

Search found 4783 results on 192 pages for 'excel vba'.

Page 109/192 | < Previous Page | 105 106 107 108 109 110 111 112 113 114 115 116  | Next Page >

  • Creating an equation in a word 2003 document using a marco (or through the API)

    - by Sambatyon
    I think the title is fully descriptive. Anyway, I need to generate a word document from my delphi application. It needs to choose from one of four different equations (with some specific parameters for each document). So far I have manage to create the whole document programmatically except the equation. Is it possible to create equations programmatically? if so, where is de API documentation from MS? if not, which solution can be used?

    Read the article

  • MS Access 2003 - Unbound Form uses INSERT statement to save to table; what about subforms?

    - by Justin
    So I have an unbound form that I use to save data to a table on button click. Is there a way I can have subforms for entry that will allow me to save data to the table within that same button click? Basically I want to add more entry options for the user, and while I know other ways to do it, I am particularly curious about doing it this way (if it can be done). So lets say the 'parent form' is frmMain. And there are two child forms "sub1" and "sub2". Just for example sake lets say on frmMain there are two text boxes: txtTitle & txtAuthor. sub1 and sub2 both have a text Box on them that represent something like prices. The idea is Title & author of a book, and then a price at each store (simplified). So I tried this (because I thought it was worth a shot): Dim db as DAO.database Dim sql as String sql = "INSERT INTO (Title, Author, PriceA, PriceB) VALUES (" if not isnull(me.txtTitle) then sql = sql & """" & me.txtTitle & """," Else sql = sql & " NULL," End If if not IsNull(me.txtAuthor) then sql = sql & " """ & me.txtAuthor & """," else sql = sql & " NULL," end if if not IsNull (forms!sub1.txtPrice) then sql = sql & " """ & forms!sub1.txtPrice & """," else sql = sql & " NULL," end if without finishing the code, i think you may see the GOTCHA i am headed for. I tried this and got an "Access cannot find the form "" ". I think I can pretty much see why on this approach too, because when I click the button that calls the new sub form into the parent form, the values that were just entered are not held/saved as sub1 closes and sub2 opens. I should mention that the idea above is not intended to be a one or the other approach, rather both sub forms used everytime. so this is an example. i want to use this method (if possible) to have about 7 different sub form choices in one form, and be able to save to a table via a SQL statement. I realize that there may be better ways, but I am just wondering if I can get there with this approach out of curiousity. Thanks as always!

    Read the article

  • MS Access group development

    - by Hubidubi
    We are planning to redesign quite a huge MS Access application. Is there any way to work concurently on the same application or is it possible to merge two seperate instance of the same file (not the data, but the forms and code). Now Access contains the data, but in the future version MySQL will host the data and Access will be only the frontend (via ODBC)

    Read the article

  • Creating an Equation Editor 3.0 equation in a Word 2003 document using a marco (or through the API)

    - by Sambatyon
    I think the title is fully descriptive now. Anyway, I need to generate a word document from my delphi application. It needs to choose from one of four different equations (with some specific parameters for each document). So far I have manage to create the whole document programmatically except the equation. Is it possible to create equations programmatically? if so, where is de API documentation from MS? if not, which solution can be used?

    Read the article

  • Brackets around Stored Procedure in ADODB Command Text

    - by KennerL90
    Help me understand why this is happening! I use the ADODB.Command object. The Command Text is set to the Stored Procedure Name. Sometimes, if I DON'T add brackets around the stored procedure name, I get a Syntax Error or Access Violation error. Sometimes, if I DO add brackets around the stored procedure name, I get a Syntax Error or Access Violation error.

    Read the article

  • Unable to remove master -> child subform links in microsoft access 2003

    - by Doug
    Hi, I am having an issue removing the master - child link fields in an access subreport data form. I have tried every avenue to remove them, using the properties window of the subreport as well as the link wizard. I have also deleted the subreport from the database and then gone as far as re-importing the existing objects into a new access instance. As soon as I re-added the subform back in and name it the same name the link fields show back up. Something is apparently corrupt, but I have run out of ideas at this point on how to clear them. Any Ideas would be appreciated. Thanks Doug

    Read the article

  • Microsoft.ACE.OLEDB.12.0 has not been Registered" Error

    - by brohjoe
    I'm getting a "The OLE DB provider "Microsoft.ACE.OLEDB.12.0 has not been registered" error. I have the data objects library downloaded and I have "Microsoft Office 12.0 Access database engine Object Library" selected. I'm running the Windows Vista 32-bit operating system. Any ideas would be greatly appreciated.

    Read the article

  • How do you hyperlink to Word 2007 help pages?

    - by Jeremy Rudd
    I want to hyperlink to a page within the Word 2007 Object Model Reference documentation, that ships with Word 2007. These are webpages that use the ms-help:// protocol that Firefox cannot understand. So I wanted to specify the ms-help:// path of the help page as a command line argument to the viewer, CLVIEW.EXE. C:\Program Files\Microsoft Office\Office12\CLVIEW.EXE Anybody know the command line syntax for this?

    Read the article

  • How do you hyperlink to Word 2007 help pages?

    - by Jeremy Rudd
    I want to hyperlink to a page within the Word 2007 Object Model Reference documentation, that ships with Word 2007. These are webpages that use the ms-help:// protocol that Firefox cannot understand. So I wanted to specify the ms-help:// path of the help page as a command line argument to the viewer, CLVIEW.EXE. C:\Program Files\Microsoft Office\Office12\CLVIEW.EXE Anybody know the command line syntax for this?

    Read the article

  • Python win32com - Automating Word - How to replace text in a text box?

    - by Greg
    I'm trying to automate word to replace text in a word document using Python. (I'm on word 2003 if that matters and Python 2.4) The first part of my replace method below works on everything except text in text boxes. The text just doesn't get selected. I notice when I go into Word manually and hit ctrl-A all of the text gets selected except for the text box. Here's my code so far: class Word: def __init__(self,visible=0,screenupdating=0): pythoncom.CoInitialize() self.app=gencache.EnsureDispatch(WORD) self.app.Visible = visible self.app.DisplayAlerts = 0 self.app.ScreenUpdating = screenupdating print 'Starting word' def open(self,doc): self.opendoc=os.path.basename(doc) self.app.Documents.Open(FileName=doc) def replace(self,source,target): if target=='':target=' ' alltext=self.app.Documents(self.opendoc).Range(Start=0,End=self.app.Documents(self.opendoc).Characters.Count) #select all alltext.Find.Text = source alltext.Find.Replacement.Text = target alltext.Find.Execute(Replace=1,Forward=True) #Special handling to do replace in text boxes #http://word.tips.net/Pages/T003879_Updating_a_Field_in_a_Text_Box.html for shp in self.app.Documents(self.opendoc).Shapes: if shp.TextFrame.HasText: shp.TextFrame.TextRange.Find.Text = source shp.TextFrame.TextRange.Find.Replacement.Text = target shp.TextFrame.TextRange.Find.Execute(Replace=1,Forward=True) #My Usage word=Word(visible=1,screenupdating=1) word.open(r'C:\Invoice Automation\testTB.doc') word.replace('[PGN]','1') The for shp in self.app .. section is my attempt to hit the text boxes. It seems to find the text box, but it doesn't replace anything.

    Read the article

  • Runtime Error 424 Object Required

    - by Luis
    Hey so I get this error in this code: Private Sub Request_Stuff_button_Click() Call Main.createObjects Call My_Control.requestStuff End Sub at the 'Call My_Control.requestStuff' line. The 'Main' module looks like this: Public My_Control As ControlObject Public Sub createObjects() If My_Control Is Nothing Then Set My_Control = New ControlObject End If End Sub The weirdest thing is that when I add Dim x As Integer x = My_Control.dummyInt right before the line that gets me the error, x gets the correct value right before the error happens which means My_Control is definitely an object and is definitely not nothing. This error is killing me, thanks in advance.

    Read the article

  • Converting plain text in SQL to hyperlink in Access

    - by manemawanna
    Hello, I've just started a new job my first since leaving University and as part of this my first task is to convert a wholly Access 2003 database to an Access front-end, SQL back-end. The Access database consists of a series of front end forms to add or review staff data, as part of this there is hyperlinks pointing to a photograph of the employee and there CV located on a shared drive. These were saved as hyperlinks within the Access DB. I have since converted the data in the Access DB to SQL and stored it in a database for me to test on, now as part of the data conversion the photo and CV locations were converted to nvarchar from hyperlink. I've done this using SSMA. My issue now is that I need to have these text links displayed and working as hyperlinks on the front end hidden behind the words "Photo" and "CV", but am unsure as to how to go about this, as in the past I've only ever used SQL and not Access. Any help or suggestions would be appreciated and if I've not been clear in any areas please feel free to ask questions and I'll try to clear anything up for you.

    Read the article

  • Access Database using do.cmd openform where clasue - returning all values

    - by primus285
    DoCmd.OpenForm "Database Search", acFormDS, , srcLastName & "AND " & srcFirstName This is only a small sample of the where clause - there are many more terms. First, there is a set of If, Then type tings up top that set the variable srcLastName and srcFirstName to some value. These are not the problem and work just fine. The trouble is getting them to return all values (for instance if you only want to search by one, on neither(return full database list)) Thus far I have settled for (in the if then section): srcLastName = "[Lastname] =" & Chr(34) & cboLastName & Chr(34) - to search for something and srcLastName = "[Lastname] <" & Chr(34) & "Nuthin" & Chr(34) - to return everything (not equal to an absurd and mispelled database term.) The trouble is that data that is null is also not returned. If I have a null firstname, it will not show up in any search period. is there a term I can set [lastname] and [firstname] equal to that will return EVERYTHING (null, open, data, numbers, wierd stuff and otherwise) in a search an SQL form of "give me everything shes got scotty" if you will. the real issue here comes from the data entry - if I could just know that the people would enter everything 100% of the time, this code would work. but forget to enter the persons age or whatever, and it wont return that entry. So far, the only other solution I have come up with is to put a counter in each if then statement. The count will go up by one for each thing that is being searched by. Then if the count is = 1, then I can search by something like just DoCmd.OpenForm "Database Search", acFormDS, , srcLastName or DoCmd.OpenForm "Database Search", acFormDS, , srcFirstName then revert back to the DoCmd.OpenForm "Database Search", acFormDS, , srcLastName & "AND " & srcFirstName when the count is 2 or more truoble here is that it only works for one (unless I so wanted to create a custon list of 2 combined, 3 combined, 4 combined, but that is not happening)

    Read the article

  • Determine whether a canvas has been inserted into each page

    - by Hadi Teo
    Hi, Currently i have a code which will print OMR Mark on each pages. Basically i insert a canvas into each page and subsequently an OMR Mark Line Series are inserted into the canvas. Recently i found an issue that somehow one of the canvas is placed out of a page and it appears at the previous page instead of the current page. Below is the code snippet in how i inserted canvas as well as OMR Marks into each page: ' Start Code Snippet Sub GenerateOMR() Dim ShpCanvas As Shape Dim MaxPages As Integer Dim PNo As Integer ClearOMR MaxPages = Selection.Information(wdNumberOfPagesInDocument) For PNo = 1 To MaxPages Selection.GoTo What:=wdGoToPage, Which:=wdGoToFirst, Count:=PNo, Name:="" Select Case PNo Case 1 Set ShpCanvas = ActiveDocument.Shapes.AddCanvas(0, 0.5, 600, 300) Case Else Set ShpCanvas = ActiveDocument.Shapes.AddCanvas(0, 0, 600, 300) End Select ' Add a canvas on each page With ShpCanvas .Name = "OMR_Canvas_" & CStr(PNo) .RelativeHorizontalPosition = wdRelativeHorizontalPositionPage .RelativeVerticalPosition = wdRelativeVerticalPositionPage End With ' Insert a white background rectange and remove the rectangle border line With ShpCanvas.CanvasItems.AddShape(msoShapeRectangle, 536, 0, 64, 300) .Name = "OMR_WhiteBackground_" & CStr(PNo) .Fill.ForeColor.RGB = RGB(255, 255, 255) .Line.ForeColor.RGB = RGB(255, 255, 255) End With PrintOMRPage ShpCanvas, PNo Next PNo End Sub ' End Code Snippet There is a custom method called PrintOMRPage method which is not relevant here. My question now, how do i know whether a canvas has been inserted into a page ? Basically i will loop in all the pages and check whether a canvas has been inserted into that page. Apparently i cannot find the correct way. I have tried to check using ActiveDocument.Shapes(1).Top and validate whether the Top position is a negative value. But apparently the Top position is always measured from the top of each page. Thanks for the help. hadi teo

    Read the article

  • Help with function in string

    - by draice
    I have a variable, emailBody, which is set to a string stored in a database emailBody = DLookup("emailBody", "listAdditions", "Id = " & itemType) The string icludes an IIf function (which includes a dlookup function). ?emailBody The new commodity is" & Iif(dlookup("IsVague", "CommodityType", "Description= " & newItem)="1", "vague.", "not vague.") How do I properly format the string so that the function will be evaluated and the result stored in the string?

    Read the article

  • Problem with a "Select Case"

    - by Nimrod
    i wrote the following section below. when debugging, i see that i enter the first Case okay. my problem is with the second Case - it does not enter it and goes to the error messege. what do i do wrong? Select Case Data_Rate Case "1", "2", "5.5", "11", "6", "9", "12", "18", "24", "36", "48", "54" a = Data_Rate Select Case Date_Rate Case "1" b = 2 Case "2", "5.5", "11" b = 1 Case Else: MsgBox ("ERROR - Data_Rate") End Select Case "0", "1", "2", "3", "4", "5", "6", "7" a = 3 Case Else: MsgBox ("ERROR - Data_Rate") End Select

    Read the article

  • MessageBox if Recordset Update is Successful

    - by Paolo Bernasconi
    In Access 2007, I have a form to add a new contact to a table: RecSet.AddNew RecSet![Code_Personal] = Me.txtCodePersonal.Value RecSet![FName] = Me.TxtFName.Value RecSet![LName] = Me.txtLName.Value RecSet![Tel Natel] = Me.txtNatTel.Value RecSet![Tel Home] = Me.txtHomeTel.Value RecSet![Email] = Me.txtEmail.Value RecSet.Update This has worked so far, and the contact has successfully been aded. But I'm having two problems: I want to display a messagebox to tell the user the contact was successfully added If the contact was not successfully added because A contact with this name already exists A different issue Then display a message box "Contact already exists" or "error occured" respectively. My idea of doing this is: If recSet.Update = true Then MsgBox "Paolo Bernasconi was successfully added" Else if RecSet![FName] & RecSet![LName] 'already exist in table MsgBox "Contact already exists" Else MsgBox "An unknown error occured" I know this code is wrong, and obviously doesn't work, but it's just to give you an idea of what I'm trying to achieve. Thanks for all your help in advance.

    Read the article

  • VBS Script Help.

    - by MalsiaPro
    I managed to get this code from you guys here, thanks so much with a collegue of mine, I ran this code a few times and it seems to work but stops after a while due to protected files such as system files, "Permission Denied" and then the script just stops, is there a way to modify the code below so that it can handle such protected files or whether it can pass them. Any advice or help is appreciated. Set objFS=CreateObject("Scripting.FileSystemObject") WScript.Echo Chr(34) & "Full Path" &_ Chr(34) & "," & Chr(34) & "File Size" &_ Chr(34) & "," & Chr(34) & "File Date modified" &_ Chr(34) & "," & Chr(34) & "File Date Created" &_ Chr(34) & "," & Chr(34) & "File Date Accessed" & Chr(34) Set objArgs = WScript.Arguments strFolder = objArgs(0) Set objFolder = objFS.GetFolder(strFolder) Go (objFolder) Sub Go(objDIR) If objDIR <> "\System Volume Information" Then For Each eFolder in objDIR.SubFolders Go eFolder Next End If For Each strFile In objDIR.Files WScript.Echo Chr(34) & strFile.Path & Chr(34) & "," &_ Chr(34) & strFile.Size & Chr(34) & "," &_ Chr(34) & strFile.DateLastModified & Chr(34) & "," &_ Chr(34) & strFile.DateCreated & Chr(34) & "," &_ Chr(34) & strFile.DateLastAccessed & Chr(34) Next End Sub Then call it from the command line like this. c:\test> cscript //nologo myscript.vbs "c:\" > "C:\test\Output.csv" Thank you :)

    Read the article

  • How to identify a selected slide is a master slide in PowerPoint 2003 Programmatically

    - by Gayan
    Recently I was working with a code to open a PowerPoint presentation (by vb.net) object and process each slide by slide. If processing slide is not null or a master slide I need to skip and go to the next one. Can anyone show me how to check whether a given slide is a master slide? Is there any way to check it by slide type? Public Sub CheckForProprtychecker(ByVal Presn As PowerPoint.Presentation) For SlideIndex As Integer = 1 To Presn.Slides.Count() If Presn.Slides(SlideIndex) Is Nothing Then Continue For End If ‘do other process Next End Sub

    Read the article

  • Alerting for incorrect cell values

    - by Allan
    My problem: I have two ranges R16 and R01. These ranges were set up by swiping each range and then renaming them in the upper left panel of the sheet. Each range requires users to fill in each cell with a value. R16 requires users to enter a number of 0 through 5. The range R01 requires a value of 0 or 1 to be entered. NO cell can be left blank in any cell within these two ranges. These ranges and requirements are specific to this sheet only. It would be nice if at the time of user entering a number, an error message appeared like [invalid entry] if the value inputted was outside parameters set. For example, in R16, if someone entered 12 or -1 they would be alerted. Finally when the user presses a button on the page to use these values in a separate process, it is essential to check that no cell is left blank. I am trying to find a way to halt the running of the marco (via the button) if these parameters above are not met. Thank you

    Read the article

  • Office Automation: What does destroy my encoding?

    - by Filburt
    I'm facing a problem with a Word Mail Merge Automation controlled by our CRM system. The setup Base for the Mail Merge is a Word .dot template which fires a macro on Document.New. Inside this macro I create a .Net component registered for COM. Set myCOMObject = CreateObject("MyCOMObject") The component pulls some data from a database and hands string values which are assigned to Word DocumentVariables. Set someClass = myCOMObject.GetSomeClass(123) ActiveDocument.Variables("docaddress") = someClass.GetSenderAddress(456) All string values returned from the component are encoded in UTF-8 (codepage 1200). What happens The problem arises when the CRM system calls Word to perform the Mail Merge: The string values from the component are turned into UTF-8 encoded strings. All the static text inside the template and the data pulled for the Mail Merge stay nicely encoded in UTF-16 - example the umlaut ü inside my DocumentVariables is turned into c3 b0 while it stays fc for the rest of the document (checked file in hex editor). If I'm creating a document from a template with the same macro functionallity but without performing a Mail Merge all strings are fine; i.e. are encoded in UTF-16. What changed According to the CRM software vendor the encoding of the Mail Merge data export was changed to UTF-16 with the new version we're currently testing. I found out that MS states that you'll expirience issues when the document and the Mail Merge data file encoding don't match. What I tried Since I'm assuming to merge with UTF-16 encoded data I added the following lines to my macro: ActiveDocument.TextEncoding = msoEncodingWestern ActiveDocument.SaveEncoding = msoEncodingUnicodeLittleEndian This is what the Mail Merge data document specifies in its document properties.

    Read the article

< Previous Page | 105 106 107 108 109 110 111 112 113 114 115 116  | Next Page >