Search results

  1. W

    VBA printing publisher document

    Thanks. As above I'm ok with access reports, I would just like to create a publisher doc, print it and then dispose of it. The problem with saving it first is sometimes different users cannot overwrite the previous version causing issues. I've searched high and low but cannot find any example...
  2. W

    VBA printing publisher document

    I need help printing a publisher document created in Access VBA: Dim DocPub As Publisher.Document, appPub As New Publisher.Application, ShpTB As Publisher.Shape Set DocPub = appPub.NewDocument DocPub.Pages.Add count:=1, After:=1 */ Create 2 page document /* I want to print the document...
  3. W

    Replace in string if almost a match

    Thanks all. Having thought a bit more it only matters if the first few characters match so I have gone with this: If Left(pracname, 4) Like Left(pracadd, 4) Then pracadd = Right(pracadd, Len(pracadd) - (InStr(pracadd, ",") + 1)) End If
  4. W

    Replace in string if almost a match

    I'm scraping data from here: https://www.nhs.uk/service-search/find-a-gp/results/BL3 It returns the practice name, address and phone all separately. The "Cleggs Lane Medical Practice/129" is easy to fix. The problem with the one above is the practice name is also in the address, but with a very...
  5. W

    Replace in string if almost a match

    I want to remove: Dr P K Jain & Dr T Subramanian from: Dr P Jain & Dr T Subramanian, Little Lever Health Centre, Mytham Road, Little Lever, Bolton, Lancashire, BL3 1JF leaving just the address. string1 = "Dr P K Jain & Dr T Subramanian" & ", ") string2 = "Dr P Jain & Dr T Subramanian...
  6. W

    Looping through array variables and assigning data

    Thanks again. The */ do stuff /* bit is this: For y = 0 To UBound(OuterArray, 1) horizpos = horizstart + (OuterArray(y)(1) * horizincrement) vertpos = vertstart + (OuterArray(y)(2) * vertincrement) party = OuterArray(y)(0) For x = 1 To min(OuterArray(y)(3), Len(OuterArray(y)(0))) Set ShpTB =...
  7. W

    Looping through array variables and assigning data

    Thanks all. I will read up more on arrays but for now I have gone with this: ar1 = Array(Title, 0, 0, 4) 'Title line 0 ar2 = Array([First Names], 8, 0, 27) 'Firstname Middlename line 0 ar3 = Array(Surname...
  8. W

    Looping through array variables and assigning data

    I want to generate multiple array variables (to hold strings and number) and loop through them. I was thinking something like: For x = 1 to 9 Dim myarray_x(3) as variant Next x This doesn’t work but I guess can be overcome using: Dim myarray(3, 8) as variant The problem now is I want to...
  9. W

    Saving duplex wia scan

    Thanks. I remember seeing that come up in a few searches but didn't realise it may help. I have tried it and modified my own code to copy it. Sadly it still doesn't save anything when using duplex. From other reading I think it may have something to do with the pages property, but I'm not sure...
  10. W

    Saving duplex wia scan

    I use the following code to scan. I have manged to get it scanning from ADF correctly single sided. I also want to duplex scan. When I change document handling properties to duplex the scanner runs and clearly performs duplex scanning. The problem is nothing is saved. What do I need to modify...
  11. W

    Finding avaiable scanner properties

    Thanks. The second like looks useful. I think I'm querying the correct property, as I think 3087 is fixed as ADF status. I'm worried it's something that's not being reported by the printer anymore. When I load a document into ADF it still scans from the flatbed whereas the previous printer would...
  12. W

    Finding avaiable scanner properties

    I'm trying to set a scanner up to use auto document feeder if it's available. It was working fine previously but I have changed my printer. I'm sure I had some code somewhere that listed the available printer/scanner options. Something like: Set wiaScanner = wiaDialog.ShowSelectDevice Dim...
  13. W

    64bit office, appactivate fails

    What do you mean by full name? AppActivate "Microsoft Excel" doesn't work? Do you mean the name as shown in the title bar? I tried that but it doesn't seem to work either. Maybe I am typing it wrong.
  14. W

    64bit office, appactivate fails

    I used to use AppActivate (oXLApp) but that ran into error with windows 10 vs 7 so I started using AppActivate "Excel" The code around it is: Dim oXLApp As Excel.Application 'Declare the object variables Dim oXLBook As Excel.Workbook Dim oXLSheet As Excel.Worksheet Set oXLApp = New...
  15. W

    64bit office, appactivate fails

    I use AppActivate "excel" One PC now has 64 bit office and on this pc the code generates an error. Can anyone help fix this?
  16. W

    Wordrange with text boxes

    Thanks. I had started to look at shapes as I use that for publisher. The following code names all the text boxes, so now I should be able to reference them properly. Dim t As Word.Shape For Each t In oDoc.Shapes t.TextFrame.TextRange.Text = t.Name Next I have this method can be a pain as...
  17. W

    Wordrange with text boxes

    I've been using the following to add info to a word document from access: Set WordRange = oDoc.GoTo(What:=wdGoToBookmark, Name:="Start") WordRange.InsertAfter Title & " " & [Surname] The problem is for formatting purposes I would like to use some text boxes. I can add bookmarks to the text...
  18. W

    Postcode lookup stopped working

    Not that it matters much but if you search say BL4 0AX you will get X, Maple Road, Bolton, Lancashire, BL4 0AX. If using your version you get X, Maple Rd, Farnworth, Bolton BL4 0AX. It's not a big deal but has always annoyed me slightly. The 192 data doesn't differentiate between local areas in...
  19. W

    Postcode lookup stopped working

    I made a few changes in how I use it. After I enter/update a postcode the code triggers. It gets sorted but annoyingly it can go 19, 2, 20 and 29, 3, 30 etc. When I double click a list item, it populates the individual address fields in my form, and adjust the address dependent on how many items...
  20. W

    Postcode lookup stopped working

    Thanks for your help. Having done some more research I found the following elsewhere on this forum: Changing Dim winReq As WinHttpRequest Set winReq = New WinHttpRequest to Dim winReq As Object Set winReq = CreateObject("MSXML2.XMLHTTP") Fixed the issue along with going https. Do you...
Back
Top Bottom