This tool offers dozens of pre-made stamps like Approved or Rejected one which can be used to quickly mark documents. Foxit Reader also has a very useful Add Stamp command. Additionally, users can add bookmarks, images, and other visual objects to the document to serve as annotations. Users can add notes to it, and even modify the look of the comment box by changing its color and size. The Add Comment command creates a little digital sticky-note anywhere on the document. PDF ViewerĪs a PDF viewer, Foxit Reader has many annotation features that people can use to comment on their documents for their own purposes or can be shared with other people. Foxit Reader can accommodate all the documents simultaneously through tabs. There is no need to open several windows. The app also has a tab feature which means you can open and edit multiple documents at the same time. The toolbar is also customizable, so users can modify the interface according to their needs and preferences. Commands are grouped into categories so users will be able to find buttons easier. Set phCreator = CreateObject("FoxitExch.Creator")Ĭall phCreator.Foxit Reader uses the ribbon-style toolbar popularized by Microsoft Office which is appropriate considering how feature-rich Foxit Reader is. ODoc.Close (True) ' close lower level drawings If InStr(1, filelist, FileName, 1) = 0 Then ' If file was open at start, do not close it. 'oPDFOptions.Value("Custom_End_Sheet") = 4Ĭall PDFAddIn.SaveCopyAs(oDoc, oPDFContext, oPDFOptions, oPDFDataMedium)įileName = Right(idwpathname, Len(idwpathname) - InStrRev(idwpathname, "\")) 'oPDFOptions.Value("Custom_Begin_Sheet") = 2 OPDFOptions.Value("Sheet_Range") = kPrintAllSheets 'oPDFOptions.Value("Vector_Resolution") = 400 OPDFOptions.Value("Remove_Line_Weights") = 0 OPDFOptions.Value("All_Color_AS_Black") = 0 If PDFAddIn.HasSaveCopyAsOptions(oDoc, oPDFContext, oPDFOptions) Then ' Check whether the translator has 'SaveCopyAs' options OPDFContext.Type = kFileBrowseIOMechanism 'Set a reference to the active document (the document to be published). If IsFileLocked(pdfpathname) = False Then Check that it is not open in another application.", vbRetr圜ancel) Do you want to replace this file?", vbOKCancel, "Overwrite?") = vbCancel ThenĪ = MsgBox("File " & pdfpathname & " is locked and cannot be replaced. If MsgBox("File " & pdfpathname & " exists. If fileExists(pdfpathname) Then ' ask if file should be overwritten 'Creating string of filenames for combining laterĬombinedFolderPath = combinedFolderPath & "|" & pdfpathname Pdfpathname = newFolderPath & "\" & idwpathname & ".pdf" Idwpathname = Left(idwpathname, Len(idwpathname) - 4) Idwpathname = Right(idwpathname, Len(idwpathname) - InStrRev(idwpathname, "\")) Idwpathname = Left(oRefDoc.FullDocumentName, Len(oRefDoc.FullDocumentName) - 3) & "idw" 'Loop through assembly and parts and create redline package If Dir(folderPath, vbDirectory) = "" Then 'Check if the folder exists, if it does then don't make one NewFolderPath = "P:\Lean Improvements\VBA Code\New Folder" Msg = MsgBox("Not a valid file.", vbOKOnly, "Invalid")įor Each oOpenDoc In įilelist = filelist + (numFiles).FullDocumentName ' 'Subtract one because array numbering starts at 0 instead of 1 Set oRefDocs = oDoc.AllReferencedDocuments Set oDoc = ThisApplication.ActiveDocument If ThisApplication.ActiveDocumentType = kDrawingDocumentObject Then Set oPrintMgr = ĭim filelist As String ' list of open filesĭim FileName As String 'truncated filename Any help is appreciated with defining the variables properly and calling the program to combine the files. My code is shown below and everything is fine until after the comment "Combine the files". I have found a reference manual for using VBA code with Foxit Phantom, but the example codes have not worked for me (reference manual attached). I haven't had much experience trying to open and operate other programs within the inventor VBA environment and haven't had much luck in my google searches either. I have successfully completed everything up to combining the pdf files into one file. I am currently working on a macro that will take an assembly drawing, print a pdf of it and pdf's of all the drawings for the parts within its BOM, and combine those PDF's into one pdf.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |