Search results

  1. W

    Closing publisher document windows 10 office 2016

    Ok I'm closing it down normally. With Windows 10 this leaves me with a blank document in an open publisher window. If running windows 10 I then use: Call Shell("taskkill /f /im mspub.exe")
  2. W

    Define printer prefs in document, then open it from access and print

    Is it possible to set the vba on open document of a word or publisher document to define printer preferences, open the document with early or late binding in access, edit it and then just print it, but have it use the vba in the actual document to select printer rather than trying to do it in...
  3. W

    Closing publisher document windows 10 office 2016

    Thanks for that I tried it but it fails with compile error. I did have a dabble with late binding when I was running office 2013 and 2016 concurrently. My reference libraries kept update when I opened and saved the files in 2016 rendering them incompatible with 2013. After a lot of effort I...
  4. W

    Closing publisher document windows 10 office 2016

    Having created a publisher document object using: Dim appPub As Publisher.Application Dim pubDoc As Publisher.Document Dim pubShape As Publisher.Shape Set appPub = New Publisher.Application Set pubDoc = appPub.Open(MyDoc) I use the following code to close it: pubDoc.Close appPub.Quit Set...
  5. W

    Print a created publisher document using vba

    I can create a publisher document and add info: Dim appPub As Publisher.Application Dim pubDoc As Publisher.Document Dim pubShape As Publisher.Shape Set appPub = New Publisher.Application Set pubDoc = appPub.Open(MydocTemp) On Error Resume Next pubDoc.Pages(1).Shapes("Text Box...
  6. W

    Help with speeding up code that reads data from excel

    I use the following code to populate a list box with available appointments from an excel spreadsheet. The line within the spreadsheet it starts from is stored in a setting table and is updated by the code each time it runs, so it doesn’t go over past appointments. I also try to keep the excel...
  7. W

    Printing issues with report and selecting printer

    Can anyone help with this? I don't understand why it works fine if the report isn't hidden, but messes up if it is.
  8. W

    Printing issues with report and selecting printer

    The following is part of a piece of code to print a report. I use the code elsewhere for other reports and it works fine with the acHidden (in bold) bit in. In this case if the acHidden bit is not commented out it ignores the paper tray and tries to print a tabular of all the records in the...
  9. W

    Auto select which scanner for WIA in VBA

    Ok I can create a vbs script and use shell to run it just before the: Set wiaScanner = wiaDialog.ShowSelectDevice So I can use sendkeys. However is there a more elegant way?
  10. W

    Auto select which scanner for WIA in VBA

    I have managed to obtain the device ID's. I just need a way to modify so the scanner is selected automatically e.g. Set wiaScanner.DeviceID = "#############" However it errors as it is a read only property.
  11. W

    Order addresses so 2,3,4... is before 10 etc

    Val() certainly looks interesting. I will have to have a play.
  12. W

    Order addresses so 2,3,4... is before 10 etc

    I use the following code to reorganize an address list: pvarArray() = Split(addlist, "^") Dim p As Long Dim iMin As Long Dim iMax As Long Dim varSwap As Variant Dim blnSwapped As Boolean iMin = LBound(pvarArray) iMax = UBound(pvarArray) - 1 Do...
  13. W

    Auto select which scanner for WIA in VBA

    I still haven't found a solution to this. It occurs with the following line of code: Set wiaScanner = wiaDialog.ShowSelectDevice I can't even use sendkeys as vba stops while it waits for you to choose. When I only had one scanner installed it never showed the dialog.
  14. W

    Retrieve paperbin info - I can't get this code to work

    Well it's a good job I got that code working. The other day knowing 1 and 2 correspond to tray 1 and tray 2 for my Brother MFC-J5720DW Printer, I tried to find out the MP Tray code by trying values 3-15 for paperbin. None of these worked so I was going to try a few more values going upwards. I...
  15. W

    Retrieve paperbin info - I can't get this code to work

    That database works fine. I have just been having a look at the code and I think I am meant to pass the device name to the procedure for the paperbin. I think that may be where my issue lies. I only tested it quickly so didn't realize. EDIT: And we have a winner. How stupid am i?
  16. W

    Retrieve paperbin info - I can't get this code to work

    I'm using win 10 64 and have access to a win 7 64 pc. I'm running office 2016 32bit. I tried the 2010 code version to. In the past I ran office 2010 64 and the declare function would turn red if not compatible. Currently that doesn't happen so I assume that part is OK.
  17. W

    Retrieve paperbin info - I can't get this code to work

    [Solved] Retrieve paperbin info - I can't get this code to work I have tried to use the code here to retrive the paperbin info from my printer, but it just gives me an error. https://msdn.microsoft.com/en-us/library/office/ff197339.aspx It seems to fail on: lngBinCount =...
  18. W

    Auto select which scanner for WIA in VBA

    I recently figured out how to select and manipulate a printer in VBA. I have 2 printer/scanners installed. I would just like to use one to scan. Whenever I try to scan using WIA a dialog box pops up asking which scanner to use. Is there a way I can select the one I want to use automatically or...
  19. W

    Select printer paper tray using VBA

    Got there as below. Just tried with the hidden property and it worked. (And managed to delete my original post in process :/)
  20. W

    Select printer paper tray using VBA

    Ok I can select tray 2 using code. I have tried various iterations of the below code. I now know that print settings have to be saved to the report itself. I have done this manually and got it to work. I am now trying with VBA. Dim iSelectedPrn As String Dim strReport As String Dim strCrit As...
Back
Top Bottom