Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 02-01-2018, 11:44 AM
ksor ksor is offline Placing text and pictures in Word-document ?? Windows 10 Placing text and pictures in Word-document ?? Office 2016
Advanced Beginner
Placing text and pictures in Word-document ??
 
Join Date: Feb 2018
Location: Århus V, Denmark
Posts: 78
ksor is on a distinguished road
Default Placing text and pictures in Word-document ??

Placing text and pictures in a WORD document.



Code:
Public Sub getBilleder(f As Form, bD As Word.Document)
    Dim tbl As DAO.Recordset
    Set tbl = CurrentDb.OpenRecordset("SELECT BILLEDE.*, BILLEDE.PersonID, BILLEDE.Sortering " & _
                                      "FROM BILLEDE WHERE (((BILLEDE.PersonID)=" & Me.PersonID & _
                                      ")) ORDER BY BILLEDE.Sortering;", dbOpenDynaset)
    With tbl
        .MoveFirst
        If .NoMatch Then Exit Sub
        bD.Content.InsertAfter ("Registrerede billeder: " & CrLf(2))
        Do
            bD.Content.InsertAfter (.Fields("Billedtekst") & CrLf(1))
            bD.Shapes.AddPicture (TrimFrom("Right", CurrentDb.Name, "\") & "IMG_files\" & .Fields("Sti til fil"))
           .MoveNext
        Loop Until .EOF
    End With
    Set tbl = Nothing
End Sub
but the text AND the pictures are places on top of earch other.

How can I arrange the text and pictures something like this:

Overall headline "Registrerede billeder: " & CrLf(2)

Text for first picture: .Fields("Billedtekst") < a frame with the picture - the biggest thimbnail>

Text for the second picture: .Fields("Billedtekst") < a frame with the picture - the biggest thimbnail>

and so on for all pictures in the recordset
Reply With Quote
 

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Placing Endnotes in the Middle of a Document lrosebush Word 3 10-24-2016 04:05 PM
Placing text and pictures in Word-document ?? VBA to split word document containing pictures using delimter uday.word Word VBA 5 09-11-2016 05:59 AM
Placing text and pictures in Word-document ?? Formula for Placing Text in A Worksheet Group? Margaret Excel 4 07-17-2016 11:54 PM
Placing text and pictures in Word-document ?? Creating a (shared!) file with CommandButton placing AutoText into the document thmsrox Word VBA 5 07-07-2016 05:04 AM
Placing text and pictures in Word-document ?? Placing Image behind Text Box alexei_lg Word 1 02-07-2012 12:28 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:06 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft