• WSsolomod

    WSsolomod

    @wssolomod

    Viewing 15 replies - 1 through 15 (of 53 total)
    Author
    Replies
    • in reply to: stop Word 2007 opening new doc in new window (Word #1101410

      Sorry guys – didn’t read the post from Hans properly… I read it as check it. So I’ve just cleared it and it works perfectly.

      I’ve been living in France for the last five years so perhaps the the red wine has something to do with it.

      Many thanks,

      David

    • in reply to: stop Word 2007 opening new doc in new window (Word #1101405

      Hello Hans,

      Sorry to say it already is.

      Many thanks,

      David

    • in reply to: Macro to copy table to another page (Word XP) #688951

      Well, I am pleased. I retire in September to France to run a B&B and to restore the old cottage next door… I cannot often contribute but I have had so much help from the Forum over the last few years.

      Glad to have been of help.

      David

    • in reply to: Macro to copy table to another page (Word XP) #688566

      I use this macro on my forms – it unprotects the doc, finds the last table, copies it, adds a page and pastes the table on, then clears the table entries. I activate the macro from a command button on the first page.

      Sub add_page()

      Dim pass
      Dim table_num As Integer
      Dim i As Integer

      pass = “your password here”

      i = ActiveDocument.Tables.count

      table_num = i

      ActiveDocument.Unprotect Password:=(pass)

      With ActiveDocument.Tables(table_num)
      .Select
      End With

      Selection.copy

      Selection.EndKey Unit:=wdStory

      Selection.InsertBreak Type:=wdPageBreak
      Selection.Paste

      i = ActiveDocument.Tables.count

      table_num = i

      With ActiveDocument.Tables(table_num)
      .Select
      Selection.Fields.Update
      End With

      ActiveDocument.Protect Password:=(pass), NoReset:=True, Type:=wdAllowOnlyFormFields

      End Sub

    • in reply to: Stuck on the last bit of code… (Word97 SR2 Win95) #667654

      Yes!!!

      Don’t apologise Hans – I salute you. I worried away all yesterday afternoon trying to make it work.

      Many thanks – treat yourself to a coffee and a cake.

      Regards,

      David

    • in reply to: Stuck on the last bit of code… (Word97 SR2 Win95) #667649

      Printing okay now except… It prints the correct number of files, say 5 for a five-page document, but instead of printing page 1 in file 1, page 2 in file 2 etc it prints 5 files containg all the pages.

      Think it’s time for coffee.

      Regards,

      David

    • in reply to: Stuck on the last bit of code… (Word97 SR2 Win95) #667641

      Hi Hans,

      Still getting an error “Invalid print range” – code looks like this:

      For i = 1 To page_num

      svPdfName = “d:batcher” & “testing again ” & i & “.pdf”

      System.PrivateProfileString(svPDFIni, “Acrobat PDFWriter”, “PDFFilename”) = svPdfName
      ActiveDocument.PrintOut Background:=0, Range:=wdPrintRangeOfPages, outputFilename:=””, _
      Item:=wdPrintDocumentContent, Copies:=1, Pages:=Chr(34) & i & Chr(34), PageType:=wdPrintAllPages, PrintToFile:=False, Collate:=False

      Next i

      Many thanks,

      David

    • in reply to: Validate date in field (WIN 95 Word 97) #654158

      Hello Fred,

      Sorry for delay in reply – just back from Provence. Very cold but sunny.

      I ran the IsDate code as part of the email macro that was triggered by the “Email this Form” command button at the top of the form. I could never get SendKeys to work.

      If you are not e-mailing the form I presume you are either printing it straight off and/or saving to the users harddrive so I would put a command button next to the last field. The button would either print or offer the save dialogue. You could run the validation macro from that.

      You could also leave the last field as a field that does not require validation. That was my easy option (move the date field to the beginning of the form so that the user would tab out of it) but the other validation processes used field numbers and I could not face the thought of sorting all the numbers out again in the macro.

      However I do not know of any way to validate a last field if the user just saves from the File drop-down. I think we need Kevin or Hans here!

      Regards,

      David

    • in reply to: Validate date in field (WIN 95 Word 97) #651239

      Hello Kevin,

      I was running the code off the command button but a Google search unearthed IsDate so I have used that and it works okay:

      Dim test_date
      test_date = ActiveDocument.FormFields(“disposal_date”).Result

      If Not IsDate(test_date) Then
      MsgBox “Please enter a valid date”, vbCritical & vbOKOnly, “Error”
      ActiveDocument.Bookmarks(“disposal_date”).Range.Fields(1).Result.Select
      Exit Sub
      End If

      Many thanks,

      David

    • in reply to: Mouseover on command button (Word 97 SR2 Win95) #641440

      Hans,

      Thanks for the tip. The button is located on the page; I dug around in Help and found out how to work a yes/no message box and used that instead.

      All the best for the New Year,

      David

    • in reply to: Combining Word Documents (Word 97) #636197

      Hans,

      Just found your macro when presented with a pile of files to combine…

      Couldn’t make Andrew’s solution work and I used a tip from the MVP to amend yours to:

      Sub CombineDocs()

      Dim sPath As String
      Dim doc As Document
      Dim strFileName As String

      With Dialogs(wdDialogCopyFile)
      If .Display 0 Then

      sPath = .Directory

      Else
      MsgBox “Dialog cancelled”
      End If
      End With

      Set doc = Documents.Add
      strFileName = Dir(sPath & “*.doc”)
      Do While strFileName “”
      Selection.InsertFile sPath & “” & strFileName
      Selection.InsertBreak wdSectionBreakNextPage
      strFileName = Dir
      Loop

      End Sub

      Worked fine for me – many thanks to you & andrew and maybe this amended version will be of use to someone.

      David

    • in reply to: Switching off field grey (Word 97 SR2 Win95) #635358

      Thank you Hans – every one a winner.

      David

    • in reply to: Word to PDF (97) #635174

      You need the full version of Adobe Acrobat.

      David

    • in reply to: Word to pdf (Word 2002) #624772

      Create each pdf file seperately. In Acrobat open the first pdf then insert the remaining files one after the other. Save as one file.

      David

    • Thanks to everybody for the help – I’ve just rattled through about 500 sheets producing 2-page pdf files in a couple of minutes.

      David

    Viewing 15 replies - 1 through 15 (of 53 total)