Click here to Skip to main content
16,016,227 members

Comments by Darryl Bryk (Top 9 by date)

Darryl Bryk 1-Jul-24 14:44pm View    
I don't understand why you said it removes an instance which hasn't been added yet. But the instance was added by a menu option, and then later removed, by the menu option. I suppose if it could somehow get removed before it was added (which wasn't possible in my code), then the remove would not find the call pointer or it would be null or something and code would continue without crashing - assume some try block in the system code.
Darryl Bryk 27-Jun-24 12:48pm View    
Thats interesting. What version of .Net are you running?
Darryl Bryk 27-Jun-24 12:47pm View    
Not sure how to do that, but that might be a forced way to do it, although it may waste resources as its still mouse tracking in the background?
Darryl Bryk 10-Jan-23 22:03pm View    
This solution looks like it will search all the doc. parts for a text and replace it with another text. What I want to do is append a text string to the current footer in a template document. This should look something like this code below which adds a child paragraph to the main document, however, I need to add a child paragraph to the footer part.

private static void AddText(WordprocessingDocument doc, string text) {
Paragraph paragraph = doc.MainDocumentPart.Document.Body.AppendChild(new Paragraph());
Run run = paragraph.AppendChild(new Run());
run.AppendChild(new Text(text));
run.PrependChild(new RunProperties());
}
Darryl Bryk 2-Aug-20 16:28pm View    
Yes, Word will let the image be pasted into the page with auto re-sizing, but this doesn't allow me to make it have 2-3 images per pg. To do that I need to fit placeholders, like one above suggested, or re-size them by calculation, which is what I'm trying to do.

It seems to me that Microsoft would know how to break this info. out since it auto-resizes, so it knows how much space is left on the pg. I just need to know how to access the same info.