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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. JimLes

    Access VBA Mail Merge Split to PDF and Word

    Well, I finally got it working with this code below. This is the same code as above that would only output one record but when I removed this code "ObjWord.MailMerge.DataSource.ActiveRecord = wdFirstRecord", it cycled through them all perfectly!! Thanks!! If strList = "Test Merge" Then...
  2. JimLes

    Access VBA Mail Merge Split to PDF and Word

    Okay, I got this far and it splits out the files like I need but it is stuck in a continual loop. Where am I going wrong? ElseIf strList = "Test Merge" Then Set ObjWordApp = CreateObject("Word.Application") Set ObjWord = ObjWordApp.Documents.Open("C\TestDocument.docx")...
  3. JimLes

    Access VBA Mail Merge Split to PDF and Word

    I don't believe I can modify the opendatasource to equal one name because I could have up to 100 employees in that table to process to letters. The names change with every run.
  4. JimLes

    Access VBA Mail Merge Split to PDF and Word

    yes, I am trying to output everything in the tblSeveranceLetters to a mailmerge that saves each by a Word and PDF with the employee's name as the filename. It works perfect only, it bundles them.
  5. JimLes

    Access VBA Mail Merge Split to PDF and Word

    I tried this and it only outputs one employee per file but it will only run the first record in the table. If strList = "Test Letter" Then Set ObjWordApp = CreateObject("Word.Application") Set ObjWord = ObjWordApp.Documents.Open("C:\TestLetter.docx")...
  6. JimLes

    Access VBA Mail Merge Split to PDF and Word

    When it stops for the message below, it shows 2 records to be processed, however, it seems to be looping through through both records at once and processing them in one file. It does create 2 Word and 2 PDF, but both employees are in each file. If MsgBox(LastRecord & " employee severance...
  7. JimLes

    Access VBA Mail Merge Split to PDF and Word

    This code works very well and does split the files into word and pdf from my access table, however, it groups them into one file. For example, if I have two names in my table: John Doe Jane Doe It will create a PDF/Word named John Doe and Jane Doe, however, John and Jane are in the same file...
  8. JimLes

    Mail Merge from Table Saving each record to Word and PDF

    I have this saving each record in tblSeveranceLetters to a word doc using Last Name but it only runs once. I get an error message that the database has been placed in a state by user Admin that prevents it from being opened or locked. Any ideas what I am doing wrong? Private Sub...
  9. JimLes

    Mail Merge from Table Saving each record to Word and PDF

    I have a code that is working where I can select multiple employees from a list box to create a table and then mail merge the data to a word document. Here is my current code: Dim currentDbName As String Dim strList As String Dim ObjWord As Word.Document DoCmd.SetWarnings False strList =...
  10. JimLes

    PowerShell Delete Large SharePoint List item 14 days old

    The script below works for a small SharePoint list but I cannot seem to get it to work with a large list over 900,000 rows. Any suggestions would be greatly appreciated. I am very new to PowerShell but I think I am missing the loop. $SiteName = "https://folio.com/mysite" $list = "Audit Only...
  11. JimLes

    Import file not working 32 to 64 upgrade

    This is the code to call on the 64 bit procedure: Public Sub ImportSeveranceData() Dim strCurrProjPath As String Dim objExcel As Object 'Excel.Application Dim objWorkbook As Object 'Excel.Workbook Dim objWorksheet As Object 'Worksheet Dim strXlFileName As String 'Excel Workbook name Dim...
  12. JimLes

    Import file not working 32 to 64 upgrade

    This module fixed it. Quote: Option Compare Database Option Explicit 'Dim strFilter As String 'Dim strInputFileName As String ' 'strFilter = ahtAddFilterItem(strFilter, "Excel Files (*.XLS)", "*.XLS") 'strInputFileName = ahtCommonFileOpenSave( _ ' Filter:=strFilter, OpenFile:=True, _ '...
  13. JimLes

    Import file not working 32 to 64 upgrade

    Option Explicit Private Declare PtrSafe Function ts_apiGetOpenFileName Lib "comdlg32.dll" _ Alias "GetOpenFileNameA" (tsFN As tsFileName) As Boolean Private Declare PtrSafe Function ts_apiGetSaveFileName Lib "comdlg32.dll" _ Alias "GetSaveFileNameA" (tsFN As tsFileName) As Boolean Private...
  14. JimLes

    Import file not working 32 to 64 upgrade

    Hello, since my pc was upgraded, this code will not run. It goes directly to the "File selection was canceled." It worked fine before the upgrade but I had to put PtrSafe declarations in the following to get it it even open. Any help would be greatly appreciated on ideas to fix???
  15. JimLes

    Update Table based on 2 Criteria from List Box

    Okay, maybe I entered it wrong but your code is working now. It could be my declaration of "VarItem" that did it but not sure. Anyway, I am very happy that it works!! strSQL = "UPDATE tblSeveranceData " _ & " SET [Date Sent Payout] = Date() " _ & " WHERE [AutoNumber] = " &...
  16. JimLes

    Update Table based on 2 Criteria from List Box

    Here was what I was getting with just the AutoNumber as the criteria. The AutoNumber was reading blank. I totally agree with you that it should be pulling because it is a primary key: UPDATE tblSeveranceData SET [Date Sent Payout]=Date() WHERE [EID]='2248808' And [AutoNumber] = Here is...
  17. JimLes

    Update Table based on 2 Criteria from List Box

    Okay, this seems to be working: I simply used both the Employee ID and Autonumber for the criteria to find the record in the table. strSQL = "UPDATE tblSeveranceData SET [Date Sent Payout]=Date() " & _ "WHERE [EID]='" & Me.EEList.Column(0, varItem) & "' And [Autonumber] =" &...
  18. JimLes

    Update Table based on 2 Criteria from List Box

    Umm, this updated all records for the employees. Wonder why it is not recognizing the autonumber? When I pull the following, column 19 is equal to the autonumber in tblSeveranceData. 'Grab items selected in Listbox iCount = 0 If Me!EEList.ItemsSelected.Count <> 0 Then...
  19. JimLes

    Update Table based on 2 Criteria from List Box

    Correct, [Term Date]= Date Since the employee may have duplicate records, I am thinking I could use the AutoNumber as a unique identifier to update the tblEmployeeData![Date Pay Out] rather than use two criteria to find the unique record. I tried this: MyDB.Execute ("UPDATE tblSeveranceData...

Part and Inventory Search

Back
Top