![]() Indeed, if I were doing this, I'd probably modify the code to automatically get the page dimensions and fit the PDF images to that, so they always fill, or at least scale to, the page size. Set DocSrc = Documents.Open(FileName:=StrFile, AddToRecentFiles:=False) You can create a fillable form in Microsoft Word itself or create a fillable portable document format form using Adobe Acrobat or other PDF editing software. ![]() With Application.FileDialog(msoFileDialogOpen) Key Benefit: Edit, sign, and share PDF files stored in OneDrive. ActiveDocument.SaveAs FileName:lsltr, AddToRecentFiles:False Now I have upgraded to Word 2021. Here are a few Microsoft Word add-ins you need in 2023 to streamline your work. In VBA, I coded this, and it worked in Word 2000. Kristian RE: Import PDF into Word Document KristianDude (TechnicalUser)ĭim StrFile As String, Rng As Range, DocSrc As Document, i As Long When the code in the macro saves a document, I usually do not want the document to be added to the 'Recent Files'. The hope is that one day, the office suite will make it easier somehow. ![]() This is just a workaround for other easy to use features that do require upgraded PDF software and/or 3rd party software. ideally, packaged entirely within the Word Document that I am working in at the time that I am running the code (ie: how I am using this code). On that screen, locate your macro, select/highlight. Click Button and the Word Options/Customize Quick Access Toolbar screen opens. I like to make my stuff usable with default and/or free software. Step 2: Add a macro button to the Quick Access Toolbar A. there is a ton more functionality when using references to say, the full paid version of Adobe Acrobat. I hope to get some time to run through your latest post Paul and will report back!Ī note to anyone else that may be reading this post. For my purposes, I don't use OCR so this is actually a great fit for what I am in need of. I tested it with other PDF versions with layers and text and it is not good at all for that. yes this is intended for non-OCR scanned PDF documents only. Selection.PasteAndFormat wdPasteDefault 'Pastes in the contentĮnd Sub RE: Import PDF into Word Document strongm (MIS) 24 Aug 16 10:55 Selection.EndKey wdStory 'Move to end of document However when I change the style manually without vba, it works fine. The selected word has the formatting for Heading 1 but it still says Normal in the style box. Selection.Expand wdParagraph 'Expands your selection to current paragraphĪctiveDocument.Close () Selection.Style 1 It has the same outcome. Selection.WholeStory 'Select whole document "", Revert:=False, WritePasswordDocument:="", WritePasswordTemplate:="", _įormat:=wdOpenFormatAuto, XMLTransform:="" Dim MyObj As Object, MySource As Object, file As Variantįile = Dir("FolderPathHere" & "FileNameHere.pdf") 'pdf pathĭocuments.Open FileName:=file, ConfirmConversions:=False, ReadOnly:= _įalse, AddToRecentFiles:=False, PasswordDocument:="", PasswordTemplate:= _
0 Comments
Leave a Reply. |