मैं एक Word 2010 मैक्रो छवियों के लिए एक सीमा कहते हैं और उन्हें केंद्र मिल गया है: सुनिश्चित नहीं हैं कि यह कैसे छवि सीमाओं के लिए काम करता है, लेकिन के लिए ईमेल पाठ यहाँ चयनित एक सरल उदाहरण है
Sub AddBlueBorderAndCenterImages()
Dim oIshp As InlineShape
Dim oshp As Shape
For Each oIshp In ActiveDocument.InlineShapes 'in line with text
With oIshp.Borders
.OutsideLineStyle = wdLineStyleSingle
.OutsideLineWidth = wdLineWidth025pt
.OutsideColor = RGB(0, 112, 192)
End With
oIshp.Select
Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter
Next oIshp
For Each oshp In ActiveDocument.Shapes 'floating with text wraped around
With oshp.Line
.Style = msoLineSingle
.Weight = 0.25
.ForeColor.RGB = RGB(0, 112, 192)
End With
Next oshp
Selection.HomeKey Unit:=wdStory 'go back to top of doc
End Sub
मैंने इसे Outlook में अपनाने का प्रयास किया है, मुख्य बात Outlook आइटम से Word के ActiveDocument को प्राप्त करने का प्रयास कर रही है। ,
Sub AddBlueBorders()
Set insp = Application.ActiveInspector
If insp.CurrentItem.Class = olMail Then
Set mail = insp.CurrentItem
If insp.EditorType = olEditorWord Then
Set wordActiveDocument = mail.GetInspector.WordEditor
For Each oIshp In wordActiveDocument.InlineShapes 'in line with text
With oIshp.Borders
.OutsideLineStyle = wdLineStyleSingle
'.OutsideLineWidth = wdLineWidth025pt ' error: one of the values passed to this method or property is out of range
.OutsideColor = RGB(0, 112, 192)
End With
Next oIshp
For Each oshp In wordActiveDocument.Shapes 'floating with text wraped around
With oshp.Line
.Style = msoLineSingle
.Weight = 0.25
.ForeColor.RGB = RGB(0, 112, 192)
End With
Next oshp
'ElseIf insp.EditorType = olEditorHTML Then
'Something else here, maybe using css?
End If
End If
End Sub
किसी कारण से यह मैं अपने हस्ताक्षर में एक कंपनी के लोगो के लिए एक सीमा नहीं जोड़ता है, हो सकता है, क्योंकि यह एक पाद लेख में बताया गया है:
तो यहाँ
आउटलुक संस्करण (किसी भी केंद्रित के बिना) है या अन्य दस्तावेज़ भाग।/ईमेल में जोड़
यह एक डिफ़ॉल्ट नहीं है और यह स्वचालित रूप से चित्रों के रूप में वे चिपके हुए हैं के लिए सीमाओं को जोड़ने नहीं है। आपको अभी भी इस मैक्रो को बटन या कुंजी शॉर्टकट से जोड़ना होगा। लेकिन उम्मीद है कि यह 4 महीने बाद भी मदद करेगा।
थोड़ा से http://en.allexperts.com/q/Microsoft-Word-1058/Word-resize-pictures.htm
स्रोत
2013-02-14 14:24:53
मैं इस विचार को विकसित करने की कोशिश की प्रेरित ने कहा, चर होने: मंद हमारे छात्रों इंस्पेक्टर मंद मेल MailItem मंद के रूप में के रूप में txt स्ट्रिंग के रूप में हालांकि, मैं कैसे में पाने के लिए नहीं देख सकते हैं एक चित्र। विचार के लिए धन्यवाद - कोई विचार यह कैसे काम करना है? –
विचार के लिए धन्यवाद, लेकिन मैं "बक्षीस" (पहली बार मैंने इसका उपयोग नहीं किया) का पुरस्कार नहीं दे सकता, क्योंकि यह समस्या का समाधान नहीं करता है। शायद यह स्वचालित रूप से लागू किया जाएगा? सुनिश्चित नहीं है कि सिस्टम कैसे काम करता है। –