Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by hermanlaksko

  1. hermanlaksko

    Convert PDF file to text

    Hi Combo Thank you for the code, witch I will test today :-) Happy easter
  2. hermanlaksko

    Convert PDF file to text

    Thank you all. I will give word an extra try :) I had hoped for some vba code, so if any of you have some surplus code in your library, that just is in the way I will happily take it of your shoulders :cool: wishing you all a happy easter :)
  3. hermanlaksko

    Convert PDF file to text

    Is there any vba code to convert PDF files into txt file - without using acrobat reader? I have searched the net but have, so far, come up empty handed, all seem to need adope acrobar. Thank you all in advance.
  4. hermanlaksko

    Open Word as ReadOnly

    wdApp.ActiveDocument.Close SaveChanges:=wdDoNotSaveChanges wdApp.Quit Set wdApp= Nothing
  5. hermanlaksko

    How to get 2 codes to work together.

    1. Duane is correct, you should use the filer in your SQL string (recordsource) as a WHERE string in the sql string, but that aside. (If you are unsure on how to get the correct result try and take your sql string in to a test query and drop it there - Create a new qry right click on it and...
  6. hermanlaksko

    How to get 2 codes to work together.

    Not sure what is in your "Me.Recordsource" but my guess is that it is a normal select statement. And the sql = Trim(Replace(Me.RecordSource, ";", "")) removed the end ";" (No $ sign needed) super that is the way, but what is this doing: If InStr(1, sql, "SELECT") <> 1 Then sql = "SELECT *...
  7. hermanlaksko

    WHERE clause in the Set command of an db.OpenRecordset method

    Try this Sub Test() Dim SQL As String, Re As DAO.Recordset SQL = CurrentDb.QueryDefs("YourQueryName").SQL 'The "SQL" will have the "string" from your query and you can add the where string or other things as you please. 'Also be aware that the last caracter of the sql string will be a ";" this...
  8. hermanlaksko

    switch between two open database

    I use this code to do that: Function OpenMDB() Dim Sti, hWnd As Long If Not WindowIsOpen("YourMdbName÷", True) Then Sti = GetDBPath & "MdbName.mdb" If Dir(Sti) = "MdbName.mdb" Then Shell "MSAccess.EXE " & Sti & " /CMD:" & Forms!Main!ID, vbMaximizedFocus Else hWnd =...
  9. hermanlaksko

    Access send email attachments - problem when null or empty

    Ahh.. forgot the IsBlank function - but strongm's <>"" works just the same, however the IsBlank function checks for null, empty, etc. all in one. '*********************************************************************************************************************** ' Navn : IsBlank '...
  10. hermanlaksko

    Access send email attachments - problem when null or empty

    I have over the years used this and expanded this code perhaps it can be of some use to you. As you can see org. code was developed by Helen - If you do not know her look her up on the web, she is very informative and worth a visit :)...
  11. hermanlaksko

    How to send email from vb.net program using modern authentication

    Perhaps this will help. SendMailMB(ToEmail, FromEMail, SubjectTxt, EText, , , , PDFfile, XlFil) Function SendMailMB(ByVal sTo As String, ByVal sFrom As String, sSubject As String, sBody As String, Optional sCC As Boolean, _ Optional sBCC As Boolean, Optional sReplyTo As String = "", Optional...
  12. hermanlaksko

    Outlook VBA - Trust access

    MSec = OApp.Application.CommandBars.ExecuteMso("MacroSecurity") ' Perhaps this i the line in access 2016
  13. hermanlaksko

    Outlook VBA - Trust access

    Try this Sub OpenTrustCenter() Dim MSec As Integer, OApp As Object Set OApp = CreateObject("Outlook.Application") MSec = OApp.Application.explorers.Item(1).CommandBars.ExecuteMso("MacroSecurity")' This will open the trustcenter for the user to change the current setting. End Sub
  14. hermanlaksko

    CTRL + BREAK from second macro button

    Perhaps I am overlooking something - but your "continue_macro:" does nothing - so either it should not be there or it should call "macro_timer" or something else [smile] Herman Say no to macros
  15. hermanlaksko

    MsgBox only showing in Ils test

    Hi Mikrom No its code in a .vb file. What I am trying to do is to get the code to show a msg var. places in the code so I know how far it is running. I have added msgbox's var places in the code (not shown above) like "Msgbox("Text 1")" etc. so it could tell me where it fails. My problem is...

Part and Inventory Search

Back
Top