Ms Word Insert

1 view
Skip to first unread message
Message has been deleted

Derek Caisse

unread,
Jul 16, 2024, 9:09:25 AM7/16/24
to disgodlpone

I'm using a VI from the MS Word/Excel Report Generation toolkit called Word Insert Field. I have an MS Word document with a named bookmark. I want to replace the bookmark text programmatically from LabVIEW. I believe WordInsert Field is the right VI, but I can't find the proper input for type- there are something like 100 choices. I just want to replace the bookmark text with the text I have provided in the text input. Should be simple...

ms word insert


DESCARGAR https://tinurli.com/2yPqZn



In the example in the attached file, I'm trying to insert the text "XXX1234" at the bookmark named LotNum in the Word file BookTest.docx. I don't know what to choose for the type constant. There are many choices, and none I've tried work correctly.

Thanks for the suggestion. Append Report Text does indeed insert the desired text at the bookmark location, but it doesn't replace the existing text that I've defined as the bookmark. It just appends. I want to programmatically update the contents of the bookmark (lot number, in this case) and then save the document with the updated text. So I think (hope) Word Insert Field is the right VI.

I have been able to replace existing text at a bookmark using Labview. My solution uses Word macros. In the Word template you use for your document, you create a Word macro that locates the bookmark you want. It is easier to create a macro for each bookmark but I think that you can pass the bookmark name as a parameter but it is not my area of expertise. Then, you create another macro that just deletes the number of characters you want to erase (once again, you can probably pass the number of characters as a parameter if you are a passable Word macro programmer). Then, you insert the new text at the bookmark. See code below.

Oops, I marked my reply as a solution, when I intended to mark your reply as the solution. Sorry about that. I do appreciate your help, and you certainly deserve credit for the help you've given me. Chalk it up to me being a beginner user of the formus... thanks again.

A long time MS/Office user here... I'm attempting to insert or paste (I've tried both) a picture into a Word 365 document. It shows the outline of the picture, but that's it. I can go to Excel, Paint, etc. and it pastes just fine. Also, prior to maybe a couple of weeks ago I've been able to paste or insert pictures with no issues. I can paste text with no issues. I suspect there may be a virus, but Norton 360 doesn't pick up anything when I do a thorough scan. Suggestions???

I tested several inserts and pastes of pictures and they show up just fine. I'm not sure how this situation happened though. I haven't adjusted the settings in the Options sections, so perhaps a SW update modified the selection. Regardless, thank you again for your assistance!!

We seem to have the same document version, and I wasn't able to replicate the issue you're experiencing. From your previous message, it seems like you've already tried the solution we provided without success.

If you're working with an older document created in Microsoft versions 2010 or 2013, try checking compatibility. For newer documents, skip this step. You can do this by going to File > Info > Check for Issues > Check Compatibility.

I'm using Affinity Designer to generate figures for my PhD thesis which I then insert into a MS Word document. My figures normally consist of both vector designs as well as microscopy images, so pixel based. As I mix figures with a lot of text, I need to use a mix of Affinity Designer and Word.

I have tried several export options for my affinity files, but am completely confused which one would be the best for this purpose. I have to slightly resize my figures in Word as I have to fulfil different page setups for different projects and want to keep the figure the same. Thus, I was thinking a PDF file would be best as I still keep the vector properties. However, there are so many different PDF options that I am unsure which one to use. The word document will later be printed but also read on a screen, so transformed into a PDF document in the end (actually for both printing and screen use).

What Catshill wrote for raster images, for vectors you could try eps.
A quick test using an ancient Word 2010 doesn't show the red stroke for emf, wmf works but both of these formats import into Word as ginormous images, they were resized to fit on the screen together, eps matches the size set in Affinity rather well, ie a 50 x 50mm star imports as 50.01 x 50.01mm

I tested this and noticed that having a 96DPI Designer RGB document and copy pasting as SVG (the appropriate Clipboard option needs to be checked in Edit > Preferences > General) works pretty well at least on Windows and up-to-date Office-365 version of Word. Exporting to WMF and converting text to curves works also fine but placed graphic needs to be manually resized. Leaving text as text left artifacts. EMF exports would import fine, but would fail when subsequently exporting to PDF.

I did not test this on macOS, but as WMF is not available there, would imagine that SVG is the best vector option there. However, on macOS PDF format might also be supported, also via Clipboard (on Windows Word I could not make PDF imports work properly, perhaps it requires some extra modules installed if it is supported, at all).

UPDATE: I now tested this on macOS, and there PDF format works very well both when pasted via Clipboard and when placing Affinity Designer created PDFs in Word. The PDFs are also placed in their correct sizes in Word documents and export without problems. On the other hand, it seems SVG is not a supported Clipboard format between Affinity apps and Word.

UPDATE2: Exporting to PDF and placing them in Word on Windows works fine, too, even if it seems that objects need to be resized (it appears that they are placed at 300 dpi resolution no matter what the nominal resolution used at export is). In Word, the PDFs need to be placed by using Insert > Object (under Text group) > Create from File (instead of placing a picture). Word can also place an interpreted and editable PDF if a PDF is placed as Insert > Object > Text from file, but there are probably many kinds of errors in interpretation.

UPDATE3: PDFs placed in a Windows Word document are actually low-res rasterizations! It is a shame, and totally absurd that Microsoft has not implemented similar support for PDFs as there exists on macOS versions of Office apps!

So in a nutshell: on macOS, vectors can be exported to Word in PDF format, and can be used both via Clipboard and as placed graphic [to be passed through]; on Windows, vectors can be exported in WMF format (text as curves) and placed in a Word document (resizing typically needed), but not transferred via Clipboard (this is not supported by Affinity apps); or: copy pasted in SVG format when enabling the appropriate option in the Preferences. But exporting to SVG files and then placing in Word has several flaws and does probably only work with very simple drawings.

I have been using Word for mac ever since I have had a mac however recently (I think since an update) word will only let me insert pictures from Photo Booth, not iPhoto or 'Photos' where all my pictures are held. This option on Word for mac is under the media browser option, pictures and the drop down menu only allows Photo Booth. Any help is welcome.

Regardless, You couldn't more wrong. Apple caused no problem. it's up to Microsoft to maintain compatibility with Apple Apps / OS, not the other way around. So stop complaining and keep using iPhoto until MS fixes it.

The version of Word you are using needs a compatibility update for Yosemite and the way, the Media Browser is working in Yosemite. The newest MacOS X changed considerably the way, applications are exchanging data. Even Apple's own applications Keynote, Numbers needed this compatibility update, to be able to access Photos in the Media Browser.

Why not continue to use iPhoto, while you are waiting for an update for Word? If you updated iPhoto to version 9.6.1, you should be able to launch it from Applications, confirm, that you want to use iPhoto and not Photos in the dialog that pops up, and ignore Photos for the time being. iPhoto works well with MacOS X 10.10.3.

Thanks - this is the one helpful response in this whole thread. I've got the same problem, but exporting the selected photos to a desktop folder is a good workaround to at least get me by for the task I'm in the middle of.

Upgrading to El Capitan automatically changed the image option to Photos - and eliminated the possibility of inserting photos into Word documents - or also attaching in Skype. Really frustrating. Keeping iPhoto is still there but photos go automatically into the Photos app now.

Pasting text from a Word document inserts lots of line breaks. Didn't have this problem before January's update but maybe I'm doing something wrong. Pasted text from Notepad works so there must be something about Word formatting.

@AGP - Thanks for reporting this. The extra line breaks are a known issue with the desktop/native version of Microsoft Word and some other desktop apps. We are looking into addressing this in a future update.

The copying improvements mentioned in the blog apply to situations where you're copying text from within the same StoryMap, a different StoryMap, most web pages, and most web-based editing/note-taking apps.

For now, if you can open your document in the web version of Word copying text will work much better. In general, web-based apps and web pages adhere to a consistent standard for text markup (this just refers to the additional, invisible information that stores the format and structure of text) while desktop apps unfortunately do not. Copying from web-based apps almost always works much better, and we've got more work to do to try to wrangle all the bizarre formatting anomalies of desktop apps.

It would also be useful for us to know if you are copying from Word because that's what you are using to write a draft of your story or if you just have a document or report in MS Word format that you need to copy an excerpt from. Would you be able to share some more info about that?

d3342ee215
Reply all
Reply to author
Forward
0 new messages